home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
tex
/
ptf12.zip
/
PTFDOCS.SRC
< prev
next >
Wrap
Text File
|
1990-05-14
|
163KB
|
5,926 lines
--::::::::::
--ptfsum.ptf
--::::::::::
.comment
.! Software User's Manual (2167A, DI-MCCR-80019A) for:
.! PORTABLE TEXT FORMATTER (PTF)
.! Prepared by: Richard Conn
.! Date: 2/27/90
.! Modifications
.! 08/18/89 1.0 Rick Conn Initial Version
.! 02/27/90 1.1 Rick Conn PTFPCR-1 to PTFPCR-4 Fixes
.! 05/07/90 1.2 Rick Conn PTFPCR-5 and PTFPCR-6 Fixes
.!
.! Description and Purpose:
.! 1. The Software User's Manual (SUM) provides user personnel
.! with instructions sufficient to execute one or more related
.! Computer Software Configuration Items (CSCIs).
.! 2. The SUM provides the steps for executing the software, the
.! expected output, and the measures to be taken if error messages
.! appear.
.! 3. The information required by this DID (Data Item Descriptor)
.! is directed to the functional user of the CSCI(s), as opposed
.! to the operator of the computer system. If this distinction does
.! not exist, the user will need to refer to both the Computer
.! System Operator's Manual and the SUM to operate the computer system
.! and to use the CSCI(s).
.!
.! Tailoring Instructions:
.! To tailor this template, fill in the areas surrounded by
.! [] as indicated.
.comment
.comment
.! This is set for PICA type (10 chars/inch). Change accordingly
.! for ELITE or other type styles. Also, the default top and bottom
.! margins and headers are used, giving 1 inch top and bottom for
.! both margins and headers at 6 lines/inch. No auto-paragraphing.
.comment
.lm 11
.rm 70
.comment
.! The following reads in a set of macros used by all the 2167A
.! document templates.
.comment
.include zzz2167a.ptf
.comment
.! Various constants
.comment
.! Set the index line length to 2 less than 1/2 the total line length
.indexlength 28
.! Set underline mode to not underline punctuation characters
.ulmode nopunct
.! Name of the index file
.vs INDEXFILE ptf.idx
.vs PTFIDXFILE ptfidx.ptf
.vs ERRORFILE ptf.err
.comment --------------- MACROs -------------------
.! The following macros are defined:
.!
.! FIG title -- generate a figure title and place it in the
.! table of contents for figures
.! EFIG -- end a figure with a dashed line (optional)
.! PRFIG -- print the table of contents for figures
.!
.! NOTE -- begin a note
.! ENDNOTE -- end a note
.!
.! ICOMM text -- enter command info into the index
.! COMM text -- enter command info into the TOC
.!
.! list n -- start a list with an indent of n
.! item token -- make a new list element using the token
.! nolist -- end the current list
.!
.comment --------------- MACROs -------------------
.nr f 0
.! ------------------- MACRO ---------------------
.define FIG
.nr f +1
.contsel 1
.cl 0 Figure @nf: @1 @2 @3 @4 @5 @6 @7 @8 @9
.ce on
Figure @nf
.br
.ul
@1 @2 @3 @4 @5 @6 @7 @8 @9
.ce off
.sp
.contsel
.en
.! ------------------- MACRO ---------------------
.define EFIG
.br
.ce
------------------------------------------------
.sp
.en
.! ------------------- MACRO ---------------------
.define PRFIG
.contsel 1
.pc
.contsel
.en
.! ------------------- MACRO ---------------------
.define OPT
.br
.need 5
.sp
.ti -5
@1 @2 @3 @4 @5 @6 @7 @8 @9
.br
.en
.! ------------------- MACRO ---------------------
.define NOTE
.sp
.ce
NOTE
.sp
.fi
.li +5
.ri +5
.en
.! ------------------- MACRO ---------------------
.define ENDNOTE
.sp
.nf
.li -5
.ri -5
.en
.! ------------------- MACRO ---------------------
.define ICOMM
\index command, @1 @2 @3 @4 @5 @6 @7 @8 @9
\index @1 @2 @3 @4 @5 @6 @7 @8 @9
.en
.! ------------------- MACRO ---------------------
.define COMM
\cl 3 @1 @2 @3 @4 @5 @6 @7 @8 @9
\sp
\need 5
\ti -5
@1 @2 @3 @4 @5 @6 @7 @8 @9
\sp
.en
.! ------------------- MACRO ---------------------
.define list
.nr a @1
.li +@1
.li +@1
.ri +@1
.en
.! ------------------- MACRO ---------------------
.define item
.sp
.ti -@na
@1
.en
.! ------------------- MACRO ---------------------
.define nolist
.li -@na
.li -@na
.ri -@na
.sp
.en
.comment ------------------ END OF MACROs ----------------------
.comment
.! Set the page heading to contain the Document Control
.! Number and date. The Document Control Number contains
.! revision and volume identification as applicable.
.! PTF 1.2 Software User's Manual
.comment
.he //PTF 1.2 Software User's Manual//
.ce on
.comment
.! The next line contains the revision indicator and the
.! date of revision.
.comment
Version 1.2: 7 May 1990
.spaceto +15
SOFTWARE USER'S MANUAL
.sp
FOR THE
.sp
.comment
.! The name of the system appears here
.comment
PORTABLE TEXT FORMATTER (PTF)
.spaceto -20
.comment
.! The contract number and other information appear here
.comment
CONTRACT NO. <None>
.sp
CDRL SEQUENCE NO. <None>
.sp 2
Prepared for:
.sp
Ada Software Repository
Host Computer WSMR-SIMTEL20.ARMY.MIL
White Sands Missile Range, New Mexico
.sp 2
Prepared by:
.sp
Richard Conn
.ce off
.comment
.! The next page starts with the Scope and is numbered 1.
.! The table of contents is created at the end of the PTF
.! output file and should be inserted after this title page.
.comment
.bp 1
.fo //#//
.cl
.SECT 0 1 Scope
.SECT 1 1.1 Identification
.PP
This manual is the Software User's Manual for the
.ul
Portable Text Formatter
(PTF), Version 1.2. This manual applies to the PTF as it operates
on any hardware platform onto which PTF has been properly installed.
.index PTF
.SECT 1 1.2 System overview
.include ptfover.ptf
.SECT 1 1.3 Document overview
.PP
The purpose of this manual is to instruct the user in how to prepare
files for input to PTF and execute PTF. This manual is also designed
as a reference document in compliance with
DoD-STD-2167A, DI-MCCR-80019A (Software User's Manual).
.index DoD-STD-2167A
.index DI-MCCR-80019A
.index Software User's Manual
.PP
Sections 3 and 4 and Appendix A contain the key parts of this document.
Section 3 is a detailed explanation of the commands recognized by PTF.
It contains a complete listing of these commands, grouped by category,
with an explanation and examples of their use. Section 4 contains
a complete listing of all error messages and warning messages which
may be produced by the PTF and PTFIDX programs. These messages flag
errors which the user may correct, internal errors which a programmer
will have to correct, and warnings which the user may wish to correct.
Appendix A contains a summary of the commands explained in Section 3.
This is a complete summary, grouped by category.
.bp
.cl
.SECT 0 2 Referenced documents
.PP
Mark Stuart Brader,
.ul
An Incremental Text Formatter,
Department of Computer Science, University of Waterloo, CS-81-12.
.PP
Department of Defense,
.ul
Proposed MIL-HDBK-1804: Military Handbook Ada Style Guide,
April 30, 1988. This document as followed closely while preparing the
source code of PTF. It is available in the Ada Software Repository.
.index MIL-HDBK-1804
.PP
R. Furuta, J. Scofield, and A. Shaw,
.ul
Document Formatting Systems: Survey, Concepts, and Issues,
ACM Computing Surveys, September 1982, Pp. 417.
.PP
Brian W. Kernighan and P.J. Plauger,
.ul
Software Tools,
Addison-Wesley (1976). PROFF was produced by rewriting the formatter
named FORMAT described in this book and by incorporating ideas from
the Freshwater Institute RUNOFF, NROFF, University of Waterloo SCRIPT,
and other formatters of similar nature.
.PP
Allyn M. Shell,
.ul
NASA/GSFC Standard Ada Pretty Printer, Version 1.1,
May 1988. This tool was used to format the Ada source code which comprises
PTF. This pretty printer and its documentation are available in the
Ada Software Repository.
.PP
Ozan S. Yigit and Steven Tress,
.ul
PROFF User's Guide Version 1.0,
March 1984, SIMTEL20 archives. This document acted as a statement
of requirements for PTF and also was lifted in many parts for literal
incorporation into this Software User's Manual.
.bp
.cl
.SECT 0 3 Execution procedures
.ap
.fi
.ju
.cl
.SECT 1 3.1 General Description
.SECT 2 3.1.1 The Input
The text that is to be formatted by PTF is typed into an input file
using any text editor. This file contains the text to be formatted
as well as PTF commands.
.index command lines
.index text lines
Each line in the input file is either a command line or a text line. A
command line is a line that begins with a period ("."). All other lines are
text lines. The command lines are not printed - they tell PTF how you want
it to format the text that follows. Appendix A summarizes all of the PTF
commands for a quick reference.
.SECT 3 3.1.1.1 Text
Text can be entered into the input file in any format. PTF removes all extra
blanks and tabs between words when operating in fill mode. This means you do
not have to worry about how many words you put on a line, and you can break
lines wherever it is convenient to your typing. Note, however, that you cannot
break a word between two lines.
.index auto-paragraphing mode
Blanks and tabs at the beginning of a line signal to begin a new
paragraph if PTF is in auto-paragraphing mode. Otherwise, blanks and
tabs at the beginning of a line are ignored unless PTF is in nofill mode,
in which case tabs are converted into the appropriate number of spaces.
.SECT 3 3.1.1.2 Commands
.index command lines
A command is a line that starts with a period. Immediately following the
period is a command name. Commands
are case-sensitive, so the commands ".list", ".List", and ".LIST" are three
different commands. Some commands accept a numeric quantity or a
character string parameter, which must be separated from the command name
by a space. For example, a left
indent command might appear as follows:
.save
.li +5
.nf
.sp
.need 5
|
|It is to do nothing that the elect exists.
|.li 5
|- Oscar Wilde
|
.restore
Assuming that the left margin was at column 1, PTF would produce the
following:
.save
.li +5
.nf
.sp
.need 4
|
|It is to do nothing that the elect exists.
| - Oscar Wilde
|
.fi
.restore
.sp
In the examples above, as in those following, the vertical line indicates
the left edge of input or the left edge of the printed page.
.index numeric arguments
.index command lines, arguments
The number following the command may be prefixed by a "+" or "-" sign.
This plus or minus sign indicates an addition or subtraction of the number
to or from the current value for the command. For example, the text:
.sp
.save
.li +5
.nf
.need 11
|
|Nothing to do but work,
|.li +3
|Nothing to eat but food,
|.li -3
|Nothing to wear but clothes
|.li +3
|To keep one from going nude.
|.li +7
|-Benjamin King
|
.li -5
.sp
will produce as output:
.sp
.li +5
.need 7
|
|Nothing to do but work,
| Nothing to eat but food,
|Nothing to wear but clothes
| To keep one from going nude.
| -Benjamin King
|
.restore
If a number is not supplied with a command that requires a number, PTF
will usually employ
a default value. The defaults for each command are summarized in
Appendix A.
.SECT 2 3.1.2 The Output
The main functions performed by PTF are
.ul
filling
and
.ul
justifying.
.index fill mode
.index justify mode
A line is
filled by packing as many words onto it as will fit. The line is justified
by spacing words evenly between the left and right margins. When PTF starts,
it assumes that the text is to be filled and justified. Of course, when fill
and justify are not needed (as in the case of a letter or a table), there are
commands to turn these features off, and back on again, as necessary.
When PTF is in fill mode, it normally removes extra spaces and tabs.
Many PTF commands cause a
.ul
break
.index break
to occur in the output. This means that the line currently being filled is
immediately output without justification.
Any following text goes into a new output line.
.SECT 2 3.1.3 Executing PTF
.index executing PTF
.index PTF, executing
Once a text file is ready for formatting, PTF is started by typing
the program name, various options, name of one or more input files
and the name
of the output file. For example the command
.sp
.li +5
ptf -po5 ptfman.ptf ptf.man
.sp
.li -5
would produce a document named "ptf.man" from an input file "ptfman.ptf."
Each line would be shifted right by 5 spaces (the "-po5" option).
See section 3.3 for details on how to execute the PTF program.
.cl
.SECT 1 3.2 Command Descriptions
This section describes PTF commands. Commands specify how the program is
to process the text lines in the input file. Lines in the input file that
begin with a period (or the control character selected by the user)
immediately followed by a command name are commands. Any line that begins
with a period and followed by a _#, a _.,
or a _! is a comment line and is ignored
.index comment
.index command, comment
by PTF - this allows you to put information in the file that will be neither
processed nor output by PTF.
.index parameters
.index command, parameters
As described earlier, some of the commands can be followed by "parameters."
Parameters are used in executing a command; for example, in the command
".sp 3", the parameter "3" tells the formatter to insert 3 blank lines into
the document. The following conventions are used in describing the parameters:
.sp
.li +5
.ri +5
.ti -3
o Parameters surrounded by square brackets are optional. If not supplied, PTF
assumes a default value
(e.g., .sp [n]).
.sp
.ti -3
o Parameters surrounded by angle brackets are mandatory. PTF will display
a fatal error message if the parameter is absent (e.g., .set <variable name>).
.sp
.ti -3
o A bar character separating the parameters within brackets indicates an
alternative (e.g., .st [+|-][n] means both .st [+n] and .st [-n]).
.li -5
.ri -5
In describing the commands, the command is typed exactly as accepted by PTF
with the associated control character default ("."). If more than one form of
the command is accepted by PTF, the command names are separated with a
bar indicating an alternative.
.SECT 2 3.2.1 Filling and Justifying
.nap
.li +5
.!
.! Change the control character from period (".") to a backslash ("\")
.! to avoid the interpretation of the command headers.
.!
.cchar \
\!
\! Variable creation
\! We use variables to avoid re-typing of multiple options over
\! and over again. These variable names will be reused in the
\! appendix to produce a quick reference
\!
\set FILL .fi | .f | .fill
\COMM @FILL
\ICOMM fill
The fill command causes a line to be filled with as many words as the right
margin minus the right
indent allows. For this purpose, all extra blanks and tabs are removed
between
words. Each word is separated with a single blank. PTF automatically assumes
fill mode during the startup.
\set NOFILL .nf | .nofill
\COMM @NOFILL
\ICOMM no fill
No fill discontinues the filling of the text. PTF simply copies the text
to the output. This command may be used to pass tables and other text
unaltered through the formatter.
\set JUST .ju | .j | .justify
\COMM @JUST
\ICOMM justify
Justify causes the words on a line to be evenly spaced between the left and
the right margins
(plus the left and minus the
right indent). Note that lines can be justified only if lines are also
being filled. PTF automatically assumes justify mode during the startup.
\set NOJUST .nj | .nojustify
\COMM @NOJUST
\ICOMM no justify
No justify discontinues the justification of text.
\li -5
\cchar
.SECT 2 3.2.2 Text Formatting
.li +5
.cchar \
\set BREAK .br | .break
\COMM @BREAK
\ICOMM break
Break causes a break: the current line is printed without justification,
and the next word is placed at the beginning of a new line. Note that many
PTF commands cause an implicit break.
\set TINDENT .ti | .i | .left [+|-][n]
\COMM @TINDENT
\ICOMM temporary indent
Temporary indent is identical to the left indent command except that it
applies only to the next line of printed text. Thus, the command
".ti +5" would cause the next line to be printed 5 spaces to the right
of those that follow.
\set SPACETO .st | .spaceto [-][n]
\COMM @SPACETO
\ICOMM space to
Spaceto allows spacing to line [n] from the top of the current page.
If a negative [n] is specified, then spacing is performed to line [n]
from the bottom of the page. The top margin and header lines and bottom
margin and footer lines are not counted (so ".st 0" places you at the
first line on the page). Thus, footnotes
can be set at a fixed distance from the bottom of the page by a command such
as ".st -5".
\set SPACE .sp | .s | .skip [n]
\COMM @SPACE
\ICOMM space
Skip causes a break and skips [n] lines. The skip command
is dependent on the setting of line spacing.
\set CENTER .ce | .center [n | on | off]
\COMM @CENTER
\ICOMM center
Center causes the next [n] lines of text to be centered between the left
and right margins and left and right
indents.
If [n] is omitted, only the next line is centered.
Centering may be started with "on" and terminated with
"off", in which case all input lines between these commands will be centered.
\set UNDLINE .ul | .underline [n | on | off]
\COMM @UNDLINE
\ICOMM underline
Underline causes the text on the next [n] input lines to be underlined
when printed. If [n] is omitted, only the next line is underlined.
This command
does not cause a break, so words in filled text may be underlined by:
\sp
\save
\cchar
.li +5
.nf
.need 11
.FIG Example of Underlining
.sp
|
|The "Pay-off" Theory: Only
|.ul
|losers
|believe in luck, horses, horoscopes
|and
|.ul
|lotteries.
|
.li -5
.sp
to get
.li +5
.sp
.ne 4
.fi
|
.br
|The "Pay-off" Theory: Only
.ul
losers
believe in
.br
|luck, horses, horoscopes and
.ul
lotteries.
.br
|
.sp 2
.restore
Underlining may be started with "on" and terminated with "off," similar to
the centering command.
\set DU .du
\COMM @DU
\ICOMM disable underline
Turns underlining off. All underlining commands are ignored. This feature is
useful for rough drafts.
\set EU .eu
\COMM @EU
\ICOMM enable underline
Turns the underlining feature back on. Underlining is enabled during the PTF
startup.
\set CUNDLINE .ulmode [all | nopunct]
\COMM @CUNDLINE
\ICOMM underline mode
Underline mode sets the form of underlining to cover all characters of
a word or to not underline the punctuation characters. The punctuation
characters are shown below.
\sp
\cchar
.ne 8
.FIG Punctuation Characters
.nf
.nap
_. (Period) _? (Question Mark)
_, (Comma) _! (Exclamation Mark)
_; (Semicolon)
.ap
.fi
.sp 2
.cchar \
\set BOLD .bd | .bold [n | on | off]
\COMM @BOLD
\ICOMM bold
The bold command causes the text on the next [n] input lines to be highlighted
by overstriking. If [n] is omitted, only the next line is highlighted.
Bolding may be started with "on" and terminated with "off" as in the
case of the center and underline commands.
\set DBO .db | .dbo
\COMM @DBO
\ICOMM disable bolding
Turns the bolding off. All bolding commands are ignored. This feature is
useful for rough drafts.
\set EBO .eb | .ebo
\COMM @EBO
\ICOMM enable bolding
Turns the bolding feature back on. Bolding is turned on during the PTF
startup.
\li -5
\cchar
.SECT 2 3.2.3 Page Formatting
.li +5
.cchar \
\set LS .ls | .spc | .spacing [n]
\COMM @LS
\ICOMM line spacing
Line spacing is the command to set line spacing.
Set n to 1 for single spacing,
2 for double spacing etc. If [n] is omitted, single spacing is enabled.
\set BP .bp | .pg | .page [n]
\COMM @BP
\ICOMM begin page
The begin page command causes a break, ends the current page, outputs
footers if required and begins a new page,
outputting headers if required. If [n] is present, the page number of
the new page
is set to [n]. The default action is to number the pages incrementally.
\set PN .pn | .pagenumber [{lower__roman} | {upper__roman} | {arabic}] [text]
\COMM @PN
\ICOMM page number
\index page number format
The page number format
command defines the format of the page number. Uppercase or lowercase Roman
numerals may be obtained with "upper__roman"
or "lower__roman" keywords. To convert the page numbers
back to normal, "arabic" is specified. PTF uses Arabic numerals as
a default. PTF requires only the first letter ('a', 'l', or 'u') of
the first token after the ".pn" to
be specified, and the rest of the letters in the first argument are ignored.
If either form of Roman numerals is selected, only numbers less than
1,000 can be printed; numbers equal to or larger than 1,000 are printed
as 'zzz' or 'ZZZ' (depending on the case selected).
If the [text] option is also present, then [text] becomes the form of
the page number as it is printed in the header, footer, contents, and
index areas. [text] should always contain a pound sign (#) character,
for which the page number itself will be substituted. If the [text]
option is not present, the last setting (defaulted to just "#") is used.
Examples:
\sp
\need 8
\cc
.FIG Sample Page Number Formats
.cc \
\sp
\nf
\na
\ul
Form of Command Format of Page Number
.pn arabic 1, 2, 3, etc. (assuming #)
.pn arabic # 1, 2, 3, etc.
.pn arabic A-# A-1, A-2, etc.
.pn lower__roman TOC-# TOC-i, TOC-ii, TOC-iii, etc.
.pn upper__roman # I, II, III, etc.
\fi
\ap
\sp
\set NPA .np | .nopaging
\COMM @NPA
\ICOMM disable paging
No paging disables the pagination. When PTF is in no paging mode,
"begin page" (.bp) and "page length" (.pl) commands are ignored. This mode
of operation is especially useful for using the PTF output with the
multi-column formatter.
\set PA .pa | .paging
\COMM @PA
\ICOMM enable paging
Paging enables normal page generation. This command starts a
new page and restores the page length to the
value previous to the ".np" command.
\set NE .ne | .need | .tp | .testpage [n]
\COMM @NE
\ICOMM test page
Test page checks to see whether at least [n] lines remain in the
current page. If less than this number of lines remains, printing will resume
at the top of a new page. If [n] is missing, it is assumed to be zero.
\set HE .he | .header [n] <text>
\COMM @HE
\ICOMM header
Header sets the text to be printed on top of each page. <text> is
divided into sections which are to be left justified, centered and right
justified. To divide <text> into these three parts, the first character is
assumed to be a separator (e.g., /left/center/right/). Any non-alphanumeric
character may also be used. The character "#" is replaced with the
current page number. If [n] is specified, the command acts on the indicated
header line (see the ".nlheader" command); if [n] is not specified, the
command acts on header line 1.
\set FO .fo | .footer [n] <text>
\COMM @FO
\ICOMM footer
Footer is identical to header except that it sets the text to be printed
at the bottom of each page. If [n] is specified, the command acts on the
indicated footer line (see the ".nlfooter" command); if [n] is not specified,
the command acts on footer line 2.
\set OHE .oh [n] <text>
\COMM @OHE
\ICOMM odd header
The odd header command sets the header for odd pages only.
\set EHE .eh [n] <text>
\COMM @EHE
\ICOMM even header
The even header command sets the header for even pages only.
\set OFO .of [n] <text>
\COMM @OFO
\ICOMM odd footer
The odd footer command sets the footer for odd pages only.
\set EFO .ef [n] <text>
\COMM @EFO
\ICOMM even footer
The even footer command sets the footer for even pages only.
\li -5
\cchar
.SECT 2 3.2.4 Page Layout
.index page layout
.index layout, page
.ap
These commands are used to specify where on the page the formatted
text is to be placed.
The ".nltop" and ".nlbottom" commands set the top and
bottom margins, which are the number of blank lines at the top and bottom
of a page. The ".nlheader" and ".nlfooter" commands set the number of lines
in the page header and page footer areas. The ".pl" set the total number
of lines on a page, which includes the margins, headers, and footers.
The ".lm" and ".rm" commands set the left and right margins. The left
margin is the number of the column in which the first printable character
appears. The right margin is the number of the column in which the last
printable character appears. Centering in the header and footer lines
is done between the left and right margins.
The ".li" and ".ri" commands set the amount of left and right indentation
from the left and right margins. This is an additional amount of
identation beyond that of the margins. Centering within the text of the
document is based on both the margins and indentation settings.
The ".po" (page offset) command is used to move the entire page over
a given number of columns.
The general layout of a page is as follows:
.br
.sp
.need 32
.nap
.FIG General Layout of a Page
.nf
+----+-------------------------------------+----+ -+
| | top margin (.nltop) | | |
+----+-------------------------------------+----+ |
| | header lines (.nlheader) | | |
+----+-------------------------------------+----+
| | | | P
| |<-- left margin (.lm) | | A
| | . | | G
| | T | | E
| | E | |
| | X | | L
| | T | | E
| | . | | N
| | right margin (.rm) -->| | G
| | . | | T
| | . | | H
| | . | |
| | |<-- left indent (.li) | | |(.pl)
| | | right indent (.ri) -->| | |
| | . | | |
+----+-------------------------------------+----+ |
| | footer lines (.nlfooter) | | |
+----+-------------------------------------+----+ |
| | bottom margin (.nlbottom) | | |
+----+-------------------------------------+----+ -+
^
|
page offset (.po)
.fi
.sp 2
.li +5
.cchar \
\set PO .po | .offset [+|-][n]
\COMM @PO
\ICOMM page offset
\ICOMM offset
The page offset command moves the entire page to the right or left
depending on the
specified value. All indentation is according to the page offset. PTF
assumes a page offset of 0 during the startup. If [n] is specified with a
plus or minus, it will be added or subtracted from the current value.
\set LM .lm | .leftmargin [+|-][n]
\COMM @LM
\ICOMM left margin
Left Margin sets the position of the first printable character from the
left edge of the page to [n]. Default value for left margin is 12.
A plus or minus value will be added or subtracted from the current value.
If [n] is not specified, left margin is set to the default value.
\set RM .rm | .rightmargin [+|-][n]
\COMM @RM
\ICOMM right margin
Right Margin sets the position of the last printable character from the
left edge of the page to [n]. Default value for right margin is 90.
A plus or minus value will be added or subtracted from the current value.
If [n] is not specified, right margin is set to the default value.
\set LINDENT .in | .indent | .li | .leftindent [+|-][n]
\COMM @LINDENT
\ICOMM left indent
Left indent causes a break and indents the following lines [n] spaces to the
right of the left margin. [n] can be negative to allow beginning a line
to the left of the left margin, however, a line cannot begin to the left of
column 1. If a plus or minus sign is used with n, then [n] is added or
subtracted to or from the current value.
\set RINDENT .ri | .rightindent [+|-][n]
\COMM @RINDENT
\ICOMM right indent
Right indent causes a break and indents the following lines [n] spaces to the
left of the right margin. [n] can be negative to allow beginning a line
to the right of the right margin. If a plus or minus sign is used with n,
then [n] is added or
subtracted to or from the current value.
\set PL .pl | .ps | .pagesize [n]
\COMM @PL
\ICOMM page length
Page length is used to set the number of lines that are to be printed
on a page including the header and footer lines
and top and bottom margins. After [n] lines are printed,
the paper will advance to the top of next page. The default page length is
66 lines (11 inches for 6 lines/inch). This command is disabled if nopaging
is set.
\set M1 .nltop [n]
\COMM @M1
\ICOMM top margin
This command
sets the number of lines (not including the header) which will be left at
the top of the page to [n]. The default setting is 4. If [n] is omitted, is
set to the default.
\set M2 .nlheader [n]
\COMM @M2
\ICOMM header lines
\index header lines
This command
sets the number of header lines. The default setting is 2 so that a ".he"
command will result in the header text being followed by a blank line by
default. The first of the header lines is number 1.
\set M3 .nlfooter [n]
\COMM @M3
\ICOMM footer lines
\index footer lines
This command
sets the number of footer lines. The default setting is 2 so that a ".fo"
command will result in the footer text being preceeded by a blank line by
default. The first of the footer lines is number 1.
\set M4 .nlbottom [n]
\COMM @M4
\ICOMM bottom margin
This command
sets the number of lines (not including the footer) which will be left at
the bottom of the page to [n]. The default setting is 4.
\li -5
\cchar
.ap
.SECT 2 3.2.5 Table of Contents and Index
.index table of contents
.index contents
.index index
This section describes the the commands that are used to generate a table of
contents and the
index. Basically, a contents line command is used in every place in
the document where an entry is needed in the table of contents.
Likewise,
an index line command is used in every place in the document where an index
entry is needed. PTF
stores the text and the page number when it encounters these commands.
After the the body of the document is processed, a print contents command
dumps a contents table. The contents will be dumped with a
nofill. Page numbering should be disabled or
reset if the table of contents is to be
used in front of the document, and auto-paragraphing should be
turned off unless it is desired to double-space the
contents. PTF supports six separate contents tables, which may be used
to generate tables of contents for the document as a whole, figures in
the document, tables in the document, etc. These contents tables are
numbered 0 through 5, and a contents table select command is given to
select one of the tables for processing.
When processing is complete, if any
index entries were made, PTF will close a file named
"@INDEXFILE" which contains all the index entries. This file contains
one index entry per line; each line contains the text of the index
entry (left justified) and the page number of the index entry (right
justified). At the beginning of the file are two lines, each containing
a single number: the first line indicates the number of columns in a
text line and the second line indicates the number of text lines on a page.
This information is read and used by the PTFIDX tool.
The "@INDEXFILE" file may then be processed by PTFIDX
or other tools
to create a sorted, permuted index or whatever type of index the user
wishes.
.index PTFIDX
.index @INDEXFILE
.index index file
PTFIDX reads the "@INDEXFILE"
file created by PTF and creates a new file,
"@PTFIDXFILE." This new file may then be edited by the user and processed
again by PTF to produce formatted index pages. In editing the
"@PTFIDXFILE" file,
.index @PTFIDXFILE
the user should define the desired left and right margins,
header and footer lines, and other attributes of the document he wishes
to set in order to make the index output of PTF look like it belongs to
the original file.
.sp
.li +5
.ap
.cchar \
\set CONTSEL .contsel [table__number]
\COMM @CONTSEL
\ICOMM contents select
The contents table select command selects one of the tables of contents
(numbered 0 to 5) for processing. Once a table is selected, the
Contents Line and Print Contents commands below operate on that table.
If the Table__Number option is omitted, table 0 is selected. Tables of
contents are maintained in intermediate files named "CNT0.CNT" to
"CNT5.CNT"; if a Print Contents command is not issued, these files
will be in the user's directory when PTF completes (the Print Contents
command deletes the associated contents file).
\set CL .cl | .contline [<n> <text>]
\COMM @CL
\ICOMM contents line
Contents line specifies a line of <text> to be entered into the table of
contents. <n> specifies the level at which the item is to be printed
in the table. When the table is printed, each level of entry will be
indented by specific number of spaces.
<text> appears in the output exactly as it appears
in the contents line command, except that leading blanks are removed.
If no options specified in the contents line, a blank is inserted during
the table output.
\set PC .pc | .printcont [n]
\COMM @PC
\ICOMM print contents
\ICOMM contents, print
Print Contents causes the currently accumulated table of contents to be
printed. If [n] is specified, it is used as the indent value for each
level. If [n] is not specified, it is defaulted to 3.
A contents line at level 0 is as wide as right margin - right
indent. The
outlook of the table of contents may be changed by altering the right
margin, left margin, right indent, and left indent values.
A typical table of contents may be produced as
follows:
\li +5
\nf
\sp
\need 9
|.page
|.he ////
|.fo ////
|.nofill
|.sp
|.center
|Table of Contents
|.sp
|.printcont
\li -5
\fi
\sp
The following example illustrates the generation of a table of contents. Note
that only one table of contents is active for a PTF session.
\sp
\need 32
\cchar
.FIG Generating a Table of Contents
.cchar \
\sp
\li +5
\nf
\nap
|.cl
|.cl 0 A. Introduction
|Introduction
| text
|.cl
|.cl 0 B. Methods
|Methods
| text
|.cl 1 a) Sampling Procedures
|Sampling
| text
|.cl 1 b) Laboratory Procedures
|Laboratory
| text
|.cl
|.cl 0 C. Results
|Results
| text
|.pg
|.nf
|.he ////
|.fo ////
|.ce
|Table of Contents
|.sp
|.pc
\sp
\cchar
.sp 2
.cchar \
\li -5
These commands will produce the following table:
\sp
\need 10
\li +2
| Table of Contents
|
|A. Introduction............................... 1
|
|B. Methods.................................... 3
| a) Sampling Procedures..................... 3
| b) Laboratory Procedures................... 4
|
|C. Results.................................... 5
\sp
\li -2
\ap
\fi
Macros may be defined as described in the following sections to help the
generation
of the table of contents.
\set IDXL .indexlength [n]
\COMM @IDXL
\ICOMM index line
\index index line length
The index line length command sets the length of the index line in the
output file "@INDEXFILE." If this command is not used or the numeric
argument is omitted, a default line length of 35 will be used.
\set IDX .index | .idx <text>
\COMM @IDX
\ICOMM index
\ICOMM index entry
The index entry command places an entry into the index file "@INDEXFILE."
This entry is stored with the current page number. If the length of
the index entry text and the page number exceeds the index line length,
the index entry text will be truncated and a warning message will be
printed on the console.
\cchar
.li -5
.SECT 2 3.2.6 Defining New Commands (Macros)
In document formatting, it is common to repeat a series of commands at
several places in the document. PTF allows you to define a new command
that will replace these repeated commands. This not only saves typing but
ensures that
.ul
exactly
the same sequence of commands are applied throughout the document. A new
command that you define is formally called a
.ul
macro.
To define a macro, you must use the define macro (.de | .define) and
end macro (.en) commands.
.li +5
.cchar \
\set DEF .de | .define <macro name>
\COMM @DEF
\ICOMM define macro
\ICOMM macro, define
Define is used to define a <macro name> to which a series of commands to
be assigned. This definition line is followed by any number of PTF
commands and/or text which define the action that the macro
will subsequently produce. Macros may refer to other macros as long as
the other macros were defined before the current macro definition.
\set ENM .en
\COMM @ENM
\ICOMM end macro
\ICOMM macro, end
End macro is the last line in the command definition. You must put in this
command to finish a currently defined macro. ".en" command should not be
re-defined as a macro.
\li -5
\sp
The example below defines macros ".NOTE" and ".ENDNOTE", similar to the
RUNOFF commands of the same name.
\li +5
\nap
\nf
\need 22
\cchar
.sp
.FIG Defining Macros
.cchar \
\sp
|
|.define NOTE
|.sp
|.ce
|NOTE
|.sp
|.fi
|.li +5
|.ri +5
|.en
|
|.define ENDNOTE
|.sp
|.nf
|.li -5
|.ri -5
|.en
|
\li -5
\ap
\fi
\cchar
.sp 2
.cchar \
A macro is used like any other PTF command, appearing
as a control character followed
immediately by the name of the macro. The names of macros, as with all
PTF commands, are case-sensitive, so it is a good practice to
define your macros with either mixed upper- and lower-case characters
or all upper-case characters. This ensures that your macro name will not
conflict with the name of a predefined PTF command; if this conflict
occurs, the macro definition will hide the PTF command definition.
For example, the above macros
may be used as follows:
\li +5
\nap
\need 7
\nf
\sp
|
|.NOTE
|textextextextextextextextextext
|textextextextextextextextextext
|.ENDNOTE
|
\li -5
\sp
\fi
The following note is generated by the same macros described previously.
\cc
.nap
.NOTE
Flap's Law: Any inanimate object, regardless of its position or configuration,
may be expected to perform at any time in a totally unexpected manner for
reasons that are either entirely obscure or else completely mysterious.
.ENDNOTE
.fi
.cc \
\ap
Special symbols may be used within a macro definition. These symbols
represent
the parameters passed to a macro, delimited by blanks.
These symbols are _@0 for macro name, _@1 for the first parameter, _@2 for
the second parameter and so on, up to _@9 for the ninth parameter
and beyond (if there are 12 parameters, _@9 contains parameters
9, 10, 11, and 12). Currently,
macro parameters may only contain any text.
The previous macro "note" may now be defined as follows:
\li +5
\sp
\nap
\nf
\need 22
\cchar
.FIG Macros with Parameters
.cchar \
\sp
|
|.define NOTE
|.sp
|.ce
|_@2 _@3 _@4 _@5 _@6 _@7 _@8 _@9
|.nr m _@1
|.sp
|.fi
|.li +_@1
|.ri +_@1
|.en
|
|.define ENDNOTE
|.sp
|.nf
|.li -_@nm
|.ri -_@nm
|.en
|
\li -5
\ap
\fi
\cchar
.sp 2
.cchar \
In this version of the "NOTE" and "ENDNOTE" macros,
the first parameter (_@1)
is used to pass the values for left and right indentation.
All the rest of the macro parameters (_@2 to _@9) are used as the title of
the note. The indent value passed as the first parameter is also saved in the
number register "m" to communicate it to the "ENDNOTE" macro, such that
when the end note macro is called, both left and right indent values are
adjusted back to normal. It is possible and may be more useful to use
".save" and ".restore" commands to accomplish the same task, especially if
the macro alters the current formatting context drastically. The ".NOTE"
and ".ENDNOTE" macros may be called as follows:
\li +5
\nap
\need 7
\nf
\sp
|
|.NOTE 5 Asimov's Law of Robotics
|textextextextextextextextextext
|textextextextextextextextextext
|.ENDNOTE
|
\li -5
\fi
\ap
In this usage, the indent value will be adjusted by +5, left
and right indents will
be adjusted by +5, and the title "Asimov's Law of Robotics" will appear
centered above the note.
\cchar
.ap
.SECT 2 3.2.7 Miscellaneous
This section describes miscellaneous commands that significantly increase the
formatting powers of PTF. With the assistance of variables, PTF can
generate form letters and documents with dynamic parts. The ability to save
and restore formatter context eliminates the need to remember the exact
settings of the formatter across the document.
.li +5
.cchar \
\set VSET .vs | .set <variable> [definition]
\COMM @VSET
\ICOMM variable set
Set variable defines a variable to be later used in the document.
If the definition part is left out, PTF uses the variable name as a prompt
and allows the user to define the variable interactively.
Variable names cannot
start with a numeric character, and may only contain alphanumeric
characters. The definition of a variable may contain blanks.
All text starting with the first non-blank character after the
<variable> name to the end of the line is part of the
definition of the variable.
Once the variable is
defined, it can be used anywhere in the document, including the command
line itself. A variable substitution is invoked by an at sign (_@). A
literal _@ is inserted into text using ___@.
A variable name must be delimited by a non-alphanumeric character within the
text. If the contents of the variable is to be appended to other
alphanumeric characters, it must be surrounded by braces
("{" and "}"). The following is an example of variable usage:
\need 12
\sp
\nf
|.nf
|.vs v1 Murphy
|_@{v1}'s first law:
| Nothing is as easy as it looks.
|_@{v1}'s second law:
| Everything takes longer than you think.
|Charley's observation:
| Computers were invented by _@v1.
|
\sp
Produces the following:
\sp
\need 8
|
|Murphy's first law:
| Nothing is as easy as it looks.
|Murphy's second law:
| Everything takes longer than you think.
|Charley's observation:
| Computers were invented by Murphy.
|
\sp
\fi
\set VGET .vg | .get <variable> <prompt>
\COMM @VGET
\ICOMM variable get
Get variable is the interactive version of variable definition. In this
variant, a prompt string is used to obtain the value of the variable,
which is typed at the user's terminal. The prompt string begins with the
first non-blank character after the <variable> name and extends to the
end of the line.
\set VRG .nr <a-z> [+|-][n]
\COMM @VRG
\ICOMM number register
Number register is used to define registers that contain numeric values.
There are 26 number registers, named a-z. The command ".nr x n" sets the
number register "x" to value n; ".nr x +n" increments the number register
by n; ".nr x -n" decrements the number register by n. The value of the
number register x is placed in the text by the appearance of _@nx. A literal
_@ may be inserted using ___@.
Number registers may be used on command lines and anywhere in the text.
\set CCHAR .cc | .cchar [char]
\COMM @CCHAR
\ICOMM control char
\index character, control
Control Character sets the character that distinguishes PTF
commands from text to be formatted. As a default (and when the
".cc" command has no arguments), control character is set to
(".") period.
This character may be changed to something other than a period, either
to mimic other formatters or to disallow interpretation of lines beginning
with a period. This document makes heavy use of the ".cc" command.
\set ECHAR .ec | .echar [char]
\COMM @ECHAR
\ICOMM escape char
\index character, escape
Escape Character sets the character that disallows the
interpretation of special characters, such as "_@". PTF uses an
underline ("__") character as a default and when the ".ec" command has
no arguments.
\set FCHAR .fc | .fchar [char]
\COMM @FCHAR
\ICOMM flag char
\ICOMM character, flag
\index character, flag
Flag Character sets the character that flags the
variable names and number registers. PTF uses an
atsign ("_@") character as a default and when the ".fc" command has
no arguments.
\set SOU .so | .source | .include | .require <filename>
\COMM @SOU
\ICOMM include file
\ICOMM source file
The source (include) command allows external files to be inserted into the
input file
during the formatting. Using this feature, tables, graphs and other
documents generated outside PTF may be included into the document
being formatted. This feature is also very useful in including a common set
of macros during formatting. Include files may be nested inside other
include files. Currently, PTF only allows as many nested include
files as the memory allocation with allow. The <filename> starts with
the first non-blank character after the ".so" verb and extends to the
end of the line.
\set SAVE .sv | .save
\COMM @SAVE
\ICOMM save
The save command allows the saving of the current formatter context on a
pushdown stack. The saved context of the formatter includes
the following values and flags:
\need 19
\cchar
.FIG Formatter Context
.cchar \
\sp
\nf
\nap
values flags on | off
------ -----
left margin (.lm) fill (.fi | .nf)
right margin (.rm) justify (.ju | .nj)
left indent (.li) auto-paragraph (.ap | .nap)
right indent (.ri) paging (.pa | .np)
page offset (.po) bold (.bd | .bd)
line spacing (.ls) bolding (.ebo | .dbo)
page length (.pl) center (.ce | .ce)
margin values (.nl*) underline (.ul | .ul)
control char (.cc) underlining (.eu | .du)
escape char (.ec)
flag char (.fc)
\sp
\ap
\fi
\cchar
.sp 2
.cchar \
\set RST .rs | .restore
\COMM @RST
\ICOMM restore
The restore command pops the context stack and restores the values and flags
as defined above.
\set LEX .lx | .lex <command> [equate]
\COMM @LEX
\ICOMM lex
\ICOMM rename commands
\index renaming commands
The lexical modification command is essentially a permanent replacement of a
given command. This command is used for changing the command names without
resorting to the macro facility. Lex permanently removes the old
command name from command tables and replaces it with the new definition.
If the equate is not specified, the command becomes undefined and is
no longer recognized by PTF. The command equate should not contain
non-alphanumeric characters.
\set APR .ap
\COMM @APR
\ICOMM autoparagraph
The autoparagraph command turns on the automatic paragraphing feature. If
auto-paragraphing is on, every line that starts with a
\ul
blank
or a
\ul
tab
character starts a new paragraph. A new line is generated (.sp) and
the beginning of the paragraph is indented by five spaces.
Autoparagraphing is the equivalent of the following commands:
\sp
\li +5
\nf
|
|textextextextext
|.sp
|.ti +5
|textextextextext
|
\fi
\li -5
\set NAP .na | .nap
\COMM @NAP
\ICOMM no autoparagraph
No Autoparagraph command disables auto-paragraphing.
\set MSG .msg | .console | .con [text]
\COMM @MSG
\ICOMM message
\ICOMM console
The Message command sents the indicated text to the user's console.
It is useful for presenting messages to the user as the formatting is
in progress, indicating which options have been selected or where PTF
is currently working.
\set COMMENT .comment | .# | .. | .! [text]
\COMM @COMMENT
\ICOMM comment
\ICOMM .#
\ICOMM ..
\ICOMM .!
The text following the comment command is ignored (no processing is
done). Note that at least one space must follow the comment command
verb (e.g., ".!hello" is invalid while ".! hello" is a comment).
\set WRT .wr | .write <string>
\COMM @WRT
\ICOMM special output
\ICOMM write
Write is a special output command, only to be used to configure printers
and other output devices with escape sequences. This command outputs the
associated string as it is encountered, without going through the normal
output routines of the formatter. Currently, the output string may contain
control characters specified as "^<char>", certain commonly-used
codes (alternate forms)
which are prefixed with a backslash (_\), and other characters.
Blanks within the string are not skipped.
Following is a typical string to set a Digital La-100 printer to letter
quality print mode:
\sp
\nf
\li +5
|
|.wr ^[[2z
|
\sp
\fi
\li -5
In the control string, "^[" is the ASCII equivalent of the Escape (esc)
character.
Following mapping table is used to convert characters starting with a caret
to their binary equivalents: ("|" indicates an alternative)
\nf
\nap
\sp
\need 26
\cchar
.FIG Representation of Characters Less than Space
.cchar \
\li +5
Control chr Hex Alt Control chr Hex Alt
----------- --- --- ----------- --- ---
^_@ (soh) 00 ^P (dle) 10
^A (soh) 01 ^Q (dc1) 11
^B (stx) 02 ^R (dc2) 12
^C (etx) 03 ^S (dc3) 13
^D (eot) 04 ^T (dc4) 14
^E (enq) 05 ^U (nak) 15
^F (ack) 06 ^V (syn) 16
^G (bel) 07 ^W (etb) 17
^H (bs) 08 \b ^X (can) 18
^I (ht) 09 \t ^Y (em) 19
^J (nl) 0A \n ^Z (sub) 1A
^K (vt) 0B ^[ (esc) 1B \e
^L (np) 0C ^\ (fs) 1C
^M (cr) 0D \r ^] (gs) 1D
^N (so) 0E ^^ (rs) 1E
^O (si) 0F ^__ (us) 1F
(del) 7F \d
\sp
\li -5
\ap
\fi
\cchar
.sp 2
.li -5
.cl
.SECT 1 3.3 Executing PTF and PTFIDX
.ap
.index PTF, executing
.index executing PTF
.index PTFIDX, executing
.index executing PTFIDX
The PTF program may be invoked with a series of optional parameters and
filenames on the command line. The command synopsis is:
.sp
.ce
PTF [-pon] [-da] [-db] [-du] [-el] <input> [input2]* <output>
.sp
The square brackets ([param])
indicate an optional parameter. "[param]*"
indicates zero or more "param" entries. "<param>" indicates
a required parameter.
.SECT 2 3.3.1 Command Line Parameters
Interpretation of the
parameters is as follows:
.nap
.li +10
.OPT -da
Disables all boldface and underline commands. This command is convenient for
generating output for drafts or printers that cannot backspace.
.OPT -db
Disables all boldface commands. This command is convenient for
generating output for drafts or printers that cannot backspace.
.OPT -du
Disables all underline commands. This command is convenient for
generating output for drafts or printers that cannot backspace.
.OPT -el
Enables logging of errors and warnings to the file "@ERRORFILE."
.index @ERRORFILE
If this option is not specified, errors and warnings are sent to the
console.
.OPT -poN
Sets the page offset to N. This is equivalent to ".po" command within
the document. It is recommended that -poN option be used instead of
embedding the offset value within the document. Note that there are
no spaces between the letters "po" and the number.
.OPT input [and input2, etc.]
Specifies the input files to be formatted. PTF does not impose any
file extension. The recommended extension is ".PTF".
The input files named may be actual files to be processed or include
files. Include files are identified by being prefixed with an
ampersand (_@).
.OPT output
Specifies the output file for the formatted document. If this exists,
the user is prompted for approval to delete before proceeding.
.li -10
.ap
PTFIDX is invoked with no parameters. It performs only one function:
to translate the "@INDEXFILE" file
produced by PTF into a dual-column index
in a file named "@PTFIDXFILE." The file "@PTFIDXFILE" may then be processed
by PTF to produce a formatted index. If PTFIDX is successful, it removes
the file "@INDEXFILE."
.sp
.SECT 2 3.3.2 Include Files
An include file contains the names of files to be processed by PTF,
the names of other include files (also prefixed with an ampersand),
blank lines, and comment lines (prefixed with a double-dash (--)).
All lines in an include file begin in column one. An example of
an include file is:
.index include file
.sp
.li +5
.need 18
.FIG A Command Line Include File
.nf
|-- Include file for my book
|
|titlepage.ptf
|forward.ptf
|chapter1.ptf
|chapter2.ptf
|
|-- Chapter 3 is complex, containing many parts
|-- so I use another include file just to keep
|-- it in line separately
|_@chapter3.inc
|
|-- And so on
|chapter4.ptf
.fi
.li -5
.sp 2
.index include file, example of
.sp
.ap
.SECT 2 3.3.3 Examples
Following are some examples of PTF command lines:
.index examples of executing PTF
.index executing PTF
.sp
.ul
Example:
A>PTF ptfman.ptf ptf.man
Format this document (ptfman.prf) and output the
formatted document to the file "ptf.man".
.sp
.ul
Example:
A>PTF macros.pma ptfman.ptf ptf.man
Format this document, include the external file "macros.pma",
and output the formatted document to the file "ptf.man".
.sp
.ul
Example:
A>PTF myprinter.pma _@mybook.inc mybook.doc
Format the files named in the include file "mybook.inc" after processing
the printer-specific macro definitions in the file "myprinter.pma."
The formatted output goes into the file "mybook.doc."
.sp
.ul
Example:
A>PTF -po10 ptfman.prf ptf.man
Format this document, shift the entire document by 10 spaces to right, and
output to a file called "ptf.man".
.sp
.SECT 2 3.3.4 Creating the PTF Software User's Manual
The following is a copy of a session on a Sun workstation which illustrates
how PTF was used to create this
.ul
Software User's Manual
for PTF. Two source files were used: ptfsum.ptf (the manual itself) and
ptfsumid.ptf (which puts together the index pages). The session, with
comments preceeded by '#' characters, follows:
.sp
.nf
.nap
.li +2
.need 11
|host/user> # The files:
|host/user> # PTF -- executable PTF
|host/user> # PTFIDX -- executable PTFIDX
|host/user> # PTFSUM.PTF -- PTF source to the manual
|host/user> # PTFSUMID.PTF -- PTF source to the index
|host/user> ls -l ptf*
|-rwxr-xr-x 1 user 278528 Aug 24 10:33 ptf
|-rwxr-xr-x 1 user 212992 Aug 24 10:33 ptfidx
|-rw-r--r-- 1 user 77386 Aug 24 09:57 ptfsum.ptf
|-rw-r--r-- 1 user 1760 Aug 22 15:50 ptfsumid.ptf
|
.need 7
|host/user> # This command processes the file PTFSUM.PTF
|host/user> ptf ptfsum.ptf ptf.sum
|PTF, Version 1.2
| Output file: ptf.sum
|Warning : 4.3.A. Contents line too long - truncated
|(ptfsum.ptf: 2721)
| No Errors, 1 Warning(s)
|
.need 5
|host/user> # The ptf command above generated these files:
|host/user> ls -l ptf.sum ptf.idx
|-rw-r--r-- 1 user 5286 Aug 24 10:43 ptf.idx
|-rw-r--r-- 1 user 113590 Aug 24 10:43 ptf.sum
|
.need 6
|host/user> # Now, PTFIDX will process the PTF.IDX file
|host/user> ptfidx
|PTFIDX, Version 1.2
| ptfidx.ptf has been generated
| No Errors, No Warnings
|
.need 5
|host/user> # It is necessary to edit PTFIDX.PTF
|host/user> # because some of the index entries
|host/user> # contain dot commands
|host/user> emacs ptfidx.ptf
| < edit session omitted >
|
.need 8
|host/user> # Finally, the file PTFSUMID.PTF reads the
|host/user> # PTFIDX.PTF file and creates the formatted
|host/user> # index pages
|host/user> ptf ptfsumid.ptf ptfidx.sum
|PTF, Version 1.2
| Output file: ptfidx.sum
| No Errors, No Warnings
|
.need 3
|host/user> # PTFIDX.PTF is no longer needed
|host/user> rm ptfidx.ptf
|
.need 11
|host/user> # The result (note that PTF.IDX was removed
|host/user> # by PTFIDX when it ran earlier):
|host/user> ls -l ptf*
|-rwxr-xr-x 1 user 278528 Aug 24 10:33 ptf
|-rw-r--r-- 1 user 113590 Aug 24 10:43 ptf.sum
|-rwxr-xr-x 1 user 212992 Aug 24 10:33 ptfidx
|-rw-r--r-- 1 user 6928 Aug 24 10:52 ptfidx.ptf
|-rw-r--r-- 1 user 7622 Aug 24 10:53 ptfidx.sum
|-rw-r--r-- 1 user 77386 Aug 24 09:57 ptfsum.ptf
|-rw-r--r-- 1 user 1760 Aug 22 15:50 ptfsumid.ptf
|
.need 4
|host/user> # In particular, the formatted document files:
|host/user> ls -l ptf*.sum
|-rw-r--r-- 1 user 113590 Aug 24 10:43 ptf.sum
|-rw-r--r-- 1 user 7622 Aug 24 10:53 ptfidx.sum
|
.need 2
|host/user> # Print the document
|host/user> lpr ptf.sum ptfidx.sum
.li -2
.fi
.sp
.ap
.cl
.SECT 1 3.4 Tips on Using PTF
.ap
.SECT 2 3.4.1 Care and Feeding of Memory
.index memory usage
PTF uses a dynamic memory allocation scheme for some of its operations.
These are macro definitions, contents lines, variables and save context
operation.
Running PTF under microcomputers with limited memory resources (640k or less)
require some care in using these commands:
.list 4
.item A.
Do not declare macros that are not needed within the document.
.item B.
Do not use comments within macros. Due to delayed evaluation, comments
will also be stored as a part of the macro definition.
.item C.
Where possible, avoid using too much text within macros. It is just as
easy to pass the information during the macro call.
.item D.
Use only the shortest form of commands within macros.
.item E.
Avoid unnecessary blanks within the variable definitions.
.item F.
Avoid too many context saves without a corresponding restore. The restore
operation reclaims the memory used for a save.
.nolist
Even if the formatter is used with a system of large memory resources,
some of the precautions above are applicable (Utz's 4th law of Computer
Programming: Any given program will eventually expand to fill all the
available memory).
.SECT 2 3.4.2 Formatting Without Fuss
PTF, using its default settings, may provide reasonably formatted output
in many situations. Designed for elite type (12 characters per inch),
the default settings are sufficient to format a text file with
autoparagraphing disabled. Placing a ".ap" command at the front of a file
turns on autoparagraphing, so the user need only know one command (.ap)
in order to start putting PTF to work.
.cl
.SECT 1 3.5 Examples of Macros
The following are examples of macro definitions, use of these macros,
and the outputs they produce. As per the recommended convention in this
manual, all macro names are in all-caps (e.g., .LIST) to distinguish them
from normal PTF commands, which are in all-lower (e.g., .sp).
.sp
.SECT 2 3.5.1 Point-Form Lists
.sp
.nf
.li +5
.need 10
.cc \
|.comment --------------- MACRO ----------------------
|.! Macros to create a point-form lists.
|.! Note the use of number registers within
|.! the macros.
|.!
|.! The macros defined below are:
|.! LIST <indentation amount>
|.! ITEM <token>
|.! NOLIST
|.comment
\need 5
|.! ------------
|.define LIST
|.nr a _@1
|.li _@1
|.en
\need 6
|.! ------------
|.define ITEM
|.sp
|.ti -_@na
|_@1
|.en
\need 6
|.! ------------
|.define NOLIST
|.li -_@na
|.sp
|.en
|.! ------------
\li -5
\fi
The "LIST" macro is used to generate point-form lists. The first parameter
is an indent value, size of point-str + 1. A typical usage may be as
follows:
\need 16
\li +5
\sp
\nf
|
|Project work involves:
|.sp
|.LIST 3
|.ITEM a)
|choosing a topic
|.ITEM b)
|defining the topic
|.ITEM c)
|research
|.ITEM d)
|organizing the notes
|{etc.}
|.NOLIST
|
\li -5
\sp
The above usage will produce the following:
\need 12
\li +5
\sp
|
|Project work involves:
|
|a) choosing a topic
|
|b) defining the topic
|
|c) research
|
|d) organizing the notes
|
\sp
\li -5
\fi
The point-form recommendations under section 5.1 (Care and Feeding of
Memory) were generated with the same set of macros described above.
\cc
.sp
.SECT 2 3.5.2 Numbered Lists
.sp
.need 14
.nf
.li +5
|.comment --------------- MACRO ----------------------
|.! Macros to create numbered lists.
|.! Note the use of number registers within
|.! the macros.
|.!
|.! The macros defined below create the main list:
|.! LIST
|.! LE <text>
|.! ELIST
|.! The macros defined below create the sublist:
|.! SLIST
|.! SLE <text>
|.! ESLIST
|.comment
.need 5
|.! ------------
|.define LIST
|.nr a 0
|.li +5
|.en
.need 9
|.! ------------
|.define LE
|.sp
|.nr a +1
|.ti -4
|_@na.
|_@1 _@2 _@3 _@4 _@5 _@6 _@7 _@8 _@9
|.br
|.en
.need 5
|.! ------------
|.define ELIST
|.li -5
|.sp
|.en
.need 5
|.! ------------
|.define SLIST
|.nr b 0
|.li +5
|.sp
|.en
.need 9
|.! ------------
|.define SLE
|.nr b +1
|.ti -4
|_@na._@nb.
|_@1 _@2 _@3 _@4 _@5 _@6 _@7 _@8 _@9
|.br
|.en
.need 6
|.! ------------
|.define ESLIST
|.li -5
|.sp
|.en
|.! ------------
.li -5
.fi
Using these macros, the following shows how a list may be built:
.sp
.nf
.need 14
.li +5
|.LIST
|.LE Item A
|.LE Item B
|.SLIST
|.SLE Item B.A
|.SLE Item B.B
|.ESLIST
|.LE Item C
|.SLIST
|.SLE Item C.A
|.SLE Item C.B
|.ESLIST
|.ELIST
.li -5
.fi
The PTF commands above create a list which looks like this:
.sp
.nf
.need 12
.li +5
|
| 1. Item A
|
| 2. Item B
|
| 2.1. Item B.A
| 2.2. Item B.B
|
| 3. Item C
|
| 3.1. Item B.A
| 3.2. Item B.B
.li -5
.fi
Note how the spacing is different for sublist items (as opposed to list
items). The reader should look closely at the macro definitions of
".LIST," ".SLIST," ".LE," and ".SLE" to see the subtle distinction.
.sp
.SECT 2 3.5.3 Section Headings with Contents
.sp
.need 12
.nf
.li +5
|.comment --------------- MACRO ----------------------
|.! Macro used to create a section heading. The
|.! section heading is placed into a table of contents
|.! as well as being displayed in the document.
|.!
|.! This macro is invoked by the following command:
|.! .SECT <level> <heading number> <heading text>
|.! Parameter _@1 is the <level> number (starting at 0),
|.! Parameter _@2 is the <heading number> (like A.1 or
|.! 1.2.2.1), and the rest of the parameters are the
|.! <heading text>
|.comment
.need 11
|.! -------------
|.define SECT
|.contline _@1 _@2 _@3 _@4 _@5 _@6 _@7 _@8 _@9
|.sp 2
|.need 10
|_@2
|.ul
|_@3 _@4 _@5 _@6 _@7 _@8 _@9
|.br
|.en
|.! -------------
.sp
.fi
.li -5
The "SECT" macro places a section heading on the current page and
into the table of contents. It underlines the heading text on the page.
An example of its use:
.sp
.nf
.need 5
.li +5
|.SECT 0 1 Main Section
|.SECT 1 1.1 Subsection 1
|.SECT 1 1.2 Subsection 2
|.SECT 2 1.2.1 SubSubsection 1
|.SECT 2 1.2.2 SubSubsection 2
.fi
.li -5
.sp
The output (in the document) produced by these five commands is:
.sp
.need 15
.li +5
|
.br
|
.br
|1
.ul
Main Section
.br
|
.br
|
.br
|1.1
.ul
Subsection 1
.br
|
.br
|
.br
|1.2
.ul
Subsection 2
.br
|
.br
|
.br
|1.2.1
.ul
SubSubsection 1
.br
|
.br
|
.br
|1.2.2
.ul
SubSubsection 2
.br
.li -5
.sp
The output (in the table of contents) produced by these five commands will
be something like this (assuming that the default level indentation of
3 is used):
.sp
.need 5
.nf
.li +5
|1 Main Section ..................................... 1
| 1.1 Subsection 1 ................................ 1
| 1.2 Subsection 2 ................................ 1
| 1.2.1 SubSubsection 1 ........................ 1
| 1.2.2 SubSubsection 2 ........................ 1
.li -5
.fi
.sp
.bp
.cl
.SECT 0 4 Error messages
Three kinds of error messages are generated by PTF: (1) conventional
error messages, which indicate an error that may be readily corrected
by the user, (2) internal error messages, which indicate an internal
error (usually dynamic memory allocation problems) that may or may not
be readily corrected by the user, and (3) warning messages, on which
the user may or may not wish to take action. Each error message
has an associated error code (which may be used by a programmer to
isolate its source -- see the
.ul
PTF Software Programmer's Manual
for more information). Internal errors begin with the words "Internal
error."
Each error and warning message is prefixed with "Error:" or "Warning:"
and is suffixed with the name of the input file and the number of the line
in the input file at which the error was encountered ("(filename: line)").
Each error message is also numbered as per the paragraph and list numbering
below for ease of lookup (e.g., Error__Create is number 4.1.A).
.ec \
.SECT 1 4.1 Conventional Error Messages
The conventional error messages, which indicate errors that may be
readily corrected by the user, are listed below.
.list 4
.item A.
Error_Create
.br
"Cannot create output file"
.PP
Self-explanatory.
.item B.
Error_Delete_File
.br
"Cannot delete old output file"
.PP
Self-explanatory.
.item C.
Error_Expansion
.br
"Not enough room to expand line"
.PP
During the processing of each text line, the text line is expanded.
Variable references (\@variable or \@nx)
are replaced by the values of the variables or number registers.
Tabs are replaced the the appropriate number of spaces. If the internal
buffer used for this expansion overflows, this error message is printed.
A solution is to remove tabs (if not required) or to break the line
into two shorter pieces (if possible).
.item D.
Error_Fatal
.br
"Unexpected fatal error"
.PP
Self-explanatory. Something unexpected has caused PTF to halt
processing. The file name and line number should be the starting
point for figuring out what the problem.
.item E.
Error_Hf_Lines
.br
"Range error on number of header or footer lines"
.PP
The number of a header line or a footer line was zero (0) or exceeded
the number of header or footer line allowed by the default settings
or the .nlheader and .nlfooter commands.
.item F.
Error_Include
.br
"Error in include file: <filename>"
.PP
The named include file could not be found or there was some
problem with it.
.item G.
Error_Indent
.br
"Indentation would move to before page boundary"
.PP
A .lm, .li, or .ti command would move the starting position of the first
character in the next line to before the first character on the page.
.item H.
Error_Index_File_Create
.br
"Cannot create index file"
.PP
Self-explanatory.
.item I.
Error_Invalid_Option
.br
"Invalid option (not -db or -po#) in command line"
.PP
Self-explanatory.
.item J.
Error_Lex
.br
"No arguments given to .lex command"
.PP
Self-explanatory.
.item K.
Error_Macro
.br
"Error in macro definition"
.PP
Self-explanatory. Applies to the .define command.
.item L.
Error_Macro_End
.br
"Isolated macro end (.en) encountered"
.PP
An .en command was found with no corresponding .define.
.item M.
Error_Macro_Unknown_Command
.br
"Unknown command/macro in macro definition"
.PP
While processing and storing a macro definition, a command was encountered
which is not defined as part of PTF or as another macro. Note that
macro definitions are forward-reference only, so all macros referenced
by a macro definition must be first defined.
.item N.
Error_Margin
.br
"Left starting column greater than right"
.PP
The left indent and left margin add up to a starting column greater
than the right margin minus the right indent.
.item O.
Error_Number
.br
"Numeric conversion problem on <string>"
.PP
The indicated string could not be converted to a number (it contains
something other than the digits 0-9).
.item P.
Error_Number_Register
.br
"Error in number register definition <string>"
.PP
The indicated string contains something other than the
single lower-case letter a-z which represents a number register.
.item Q.
Error_Page_Number_Format
.br
"Invalid page number format requested"
.PP
In a .pn command, a starting character other than
"a" for Arabic, "l" for lower-case Roman, or "u" for upper-case
Roman was specified.
.item R.
Error_Source_File
.br
"Error in processing source file"
.PP
A fatal error was encountered while processing
the indicated file. This file may be a file
specified on the command line (or in an include file
referenced on the command line) or a file referenced
by a .include command.
.item S.
Error_Spaceto
.br
"Spaceto request is before current line"
.PP
A .st command's argument evaluated to a line before
the current line.
.item T.
Error_Stack_Empty
.br
"Restore requested of an empty stack"
.PP
A .restore command was issued without a corresponding .save
command.
.item U.
Error_Stack_Overflow
.br
"Save resulted in an overflow of the stack -- save not done"
.PP
Self-explanatory. This is caused by running out of dynamic memory.
.item V.
Error_Unknown
.br
"Unknown command"
.PP
Self-explanatory.
.item W.
Error_User_Abort
.br
"User Abort"
.PP
This message is printed when the user requests an
abort of PTF.
.item X.
Error_Write
.br
"Write command buffer overflow"
.PP
A .wr command resulted in an overflow of the internal
buffer used to hold the binary image which will be output.
Try breaking up the .wr command into two successive
commands or put a line break (.br) command somewhere in the
string being output.
.item Y.
Error_Variable_Set
.br
"Error in variable get or set command"
.PP
Self-explanatory.
.item Z.
Error_Variable_Name
.br
"Variable not found"
.PP
Self-explanatory.
.nolist
.SECT 1 4.2 Internal Error Messages
Internal error messages, which indicate internal errors (usually
dynamic memory allocation problems) that may or may not be readily
corrected by the user, are listed below. These messages are simply
listed below without further explanation; this information is useful
mainly to a programmer.
.list 4
.item A.
Error_Internal_Add_Index_Entry
.br
"Internal error in Index.Add_Entry"
.item B.
Error_Internal_Add_Line
.br
"Internal error in Contents.Add_Line"
.item C.
Error_Internal_Break_Line
.br
"Internal error in FOF.Break_Line"
.item D.
Error_Internal_Break_Page_1
.br
"Internal error in FOF.Break_Page (1st routine)"
.item E.
Error_Internal_Break_Page_2
.br
"Internal error in FOF.Break_Page (2nd routine)"
.item F.
Error_Internal_Bottom
.br
"Internal error in FOF.Output_Bottom_Of_Page"
.item G.
Error_Internal_Hf_Line
.br
"Internal error in FOF.Put_Header_Footer_Line"
.item H.
Error_Internal_Identify
.br
"Internal error in Command.Identify"
.item I.
Error_Internal_Increment
.br
"Internal error in Variable. Increment_Line_Number"
.item J.
Error_Internal_Macro_Define
.br
"Internal error in Macro.Define_Parameters"
.item K.
Error_Internal_Macro_Write
.br
"Internal error in Macro.Write"
.item L.
Error_Internal_Open
.br
"Internal error in Word_Processor. Open_Output_File"
.item M.
Error_Internal_Pnum
.br
"Internal error in FOF.Pnum_As_String"
.item N.
Error_Internal_Process
.br
"Internal error in Command.Process"
.item O.
Error_Internal_Print
.br
"Internal error in Contents.Print"
.item P.
Error_Internal_Put_Invisible
.br
"Internal error in FOF.Put_Invisible_Word"
.item Q.
Error_Internal_Put_Line
.br
"Internal error in FOF.Put_Line"
.item R.
Error_Internal_Put_What
.br
"Internal error in FOF.Put_Word.Put_What"
.item S.
Error_Internal_Put_Word
.br
"Internal error in FOF.Put_Word"
.item T.
Error_Internal_Set_Footer_Line
.br
"Internal error in FOF.Set_Footer_Line"
.item U.
Error_Internal_Set_Header_Line
.br
"Internal error in FOF.Set_Header_Line"
.item V.
Error_Internal_Set_Var
.br
"Internal error in Variable.Set_Var"
.item W.
Error_Internal_Skip
.br
"Internal error in FOF.Skip"
.item X.
Error_Internal_Top
.br
"Internal error in FOF.Output_Top_Of_Page"
.item Y.
Error_Internal_PTFIDX
.br
"Internal error in PTFIDX"
.nolist
.SECT 1 4.3 Warning Messages
Warning messages, on which the user may or may not wish to take
action, are listed below.
.list 4
.item A.
Warning_Contents_Line_Truncation
.br
"Contents line too long - truncated"
.PP
A contents line placed into the table of contents by the .pc
command is too long, and truncation has occurred. The user may
wish to check out the final table of contents, identify the line that
has been truncated, and then shorten its text in the .cl line in the
source file.
.item B.
Warning_Contents_Number
.br
"Invalid contents number - table 0 selected"
.PP
In a .contsel command, a number other than 0-5 was specified.
Contents table 0 was selected.
.item C.
Warning_Index_Line_Truncation
.br
"Index line too long - truncated"
.PP
An index line placed into the "@INDEXFILE"
file being generated was too
long to fit. The user may wish to shorten it, lengthen the
line length of the index file (.indexlength command), or allow the line to
be truncated.
.item D.
Warning_Index_Width
.br
"Index line too wide (index not in margins)"
.PP
An index line (generated by PTF and used by PTFIDX) should be less
than half of the length of the line (from left margin to right margin)
of the document processed by PTF. If not, the index will not appear
correctly on the pages generated by PTFIDX.
.item E.
Warning_Table_Empty
.br
"Current contents table is empty"
.PP
The current table of contents does not contain any entries.
This message appears in response to a .pc command.
.nolist
.ec
.bp
.cl
.SECT 0 5 Notes
.SECT 1 5.1 Acronyms
.include ptfacr.ptf
.SECT 1 5.2 Acknowledgements
This document is based in part on the original
.ul
PROFF User's Guide.
It is also based on the DoD-STD-2167A Software User's Manual
Data Item Descriptor (DI-MCCR-80019A).
The original
.ul
PROFF User's Guide
was written by Ozan Yigit and Steven Tress
and edited by Terry Lim and Steven Tress.
The format of that document is largely based on The Freshwater Institute
RUNOFF User's Guide.
The Quotes for the various formatting examples are
from THE QUOTABLE NOTHING BOOK and from 1001 LOGICAL LAWS, ACCURATE
AXIOMS, PROFOUND PRINCIPLES, TRUSTY TRUISMS, HOMEY HOMILIES, COLORFUL
COROLLARIES, QUOTABLE QUOTES, AND RAMBUNCTIOUS RUMINATIONS FOR ALL
WALKS OF LIFE, by Peers, Bennet and Booth, Fawcett Columbine Books,
New York.
.bp 1
.pn arabic A-#
.cl
.SECT 0 A. Summary of PTF Commands
.nap
.sp 2
.SECT 1 A.1 Filling and Justifying Commands
.nf
.sp
.cc \
\sp
----------------------------------------------------------
@FILL
initial: yes break: yes
Begin filling output lines.
----------------------------------------------------------
@NOFILL
initial: no break: yes
Stop filling.
----------------------------------------------------------
@JUST
initial: yes break: yes
Begin justifying filled lines.
----------------------------------------------------------
@NOJUST
initial: no break: yes
Stop justifying.
----------------------------------------------------------
\cc
.ne 48
.sp
.fi
.SECT 1 A.2 Text Formatting Commands
.nf
.sp
.cc \
\sp
----------------------------------------------------------
@BREAK
break: yes
Cause a break and output current line.
----------------------------------------------------------
@TINDENT
default: 0 break: yes
Temporarily indent next output n spaces.
----------------------------------------------------------
@SPACETO
default: 0 break: yes
Space to line +n from top or -n from
bottom.
----------------------------------------------------------
@SPACE
default: 1 initial: 1 break: yes
Space n lines except at top of page.
----------------------------------------------------------
@CENTER
default: 1 break: yes
Center next n lines or until turned off.
----------------------------------------------------------
@UNDLINE
default: 1 initial break: no
Underline next n lines or until turned off.
----------------------------------------------------------
@DU
initial: no break: no
Disable underlining.
----------------------------------------------------------
@EU
initial: yes break: no
Enable underlining.
----------------------------------------------------------
@CUNDLINE
default: words initial: words break: no
Set mode for underline - non-punctuation
characters or all non-blank characters.
----------------------------------------------------------
@BOLD
default: 1 break: no
Boldface (overstrike) next n lines or
until turned off.
----------------------------------------------------------
\cc
.ne 16
.sp
.fi
.SECT 1 A.2 Text Formatting Commands, Continued
.nf
.sp
.cc \
\sp
----------------------------------------------------------
@DBO
initial: no break: no
Disable bolding.
----------------------------------------------------------
@EBO
initial: yes break: no
Enable bolding.
----------------------------------------------------------
\cc
.ne 30
.sp
.fi
.SECT 1 A.3 Page Formatting Commands
.nf
.sp
.cc \
\sp
----------------------------------------------------------
@LS
default: 1 initial: 1 break: no
Set line spacing to n.
----------------------------------------------------------
@BP
default: +1 initial: 1 break: yes
Begin a new page and number it n.
----------------------------------------------------------
@PN
default: arabic initial: arabic break: no
Set page numbering to arabic, lower-case
Roman, or upper-case Roman. Define page
number text.
----------------------------------------------------------
@NPA
initial: no break: yes
Disable paging.
----------------------------------------------------------
@PA
initial: yes break: yes
Enable paging.
----------------------------------------------------------
@NE
default: 0 break: yes/no
Need n lines. Break and generate a new page
if not available.
----------------------------------------------------------
\cc
.ne 40
.sp
.fi
.SECT 1 A.4 Page Formatting Commands, Headers and Footers
.nf
.sp
.cc \
\sp
----------------------------------------------------------
@HE
initial: null break: no
Set header to text (/left/center/right/).
----------------------------------------------------------
@FO
initial: null break: no
Set footer to text (/lef/center/right/).
----------------------------------------------------------
@OHE
initial: null break: no
Set header on odd pages to text.
----------------------------------------------------------
@EHE
initial: null break: no
Set header on even pages to text.
----------------------------------------------------------
@OFO
initial: null break: no
Set footer on odd pages to text.
----------------------------------------------------------
@EFO
initial: null break: no
Set footer on even pages to text.
----------------------------------------------------------
\cc
.ne 46
.sp
.fi
.SECT 1 A.5 Page Layout Commands
.nf
.sp
.cc \
\sp
----------------------------------------------------------
@PO
default: 0 initial: 0 break: yes
Set page offset to n spaces.
----------------------------------------------------------
@LM
default: no chg initial: 12 break: yes
Set left margin to column n.
----------------------------------------------------------
@RM
default: no chg initial: 90 break: yes
Set right margin to column n.
----------------------------------------------------------
@LINDENT
default: no chg initial: 0 break: yes
Set left indent by n columns. +n moves in
and -n moves out (to the left).
----------------------------------------------------------
@RINDENT
default: no chg initial: 0 break: yes
Set right indent by n columns. +n moves in
and -n moves out (to the right).
----------------------------------------------------------
@PL
default: 66 initial: 66 break: no
Set page length to n lines.
----------------------------------------------------------
@M1
default: 4 initial: 4 break: no
Number of lines at top of page before the
header lines.
----------------------------------------------------------
@M2
default: 2 initial: 2 break: no
Number of header lines.
----------------------------------------------------------
@M3
default: 2 initial: 2 break: no
Number of footer lines.
----------------------------------------------------------
@M4
default: 4 initial: 4 break: no
Number of lines at bottom of page after
the footer lines.
----------------------------------------------------------
\cc
.ne 20
.sp
.fi
.SECT 1 A.6 Table of Contents Commands
.nf
.sp
.cc \
\sp
----------------------------------------------------------
@CONTSEL
default: 0 initial: 0 break: no
Select table of contents 0-5.
----------------------------------------------------------
@CL
default: no chg initial: 0 break: yes
Enter text into table of contents at
level n.
----------------------------------------------------------
@PC
default: 3 initial: 3 break: yes
Print table of contents, indent each level
n spaces.
----------------------------------------------------------
@IDX
break: no
Make an index entry into the index
file "@INDEXFILE."
----------------------------------------------------------
@IDXL
default: no chg initial: 35 break: no
Set length of index line in "@INDEXFILE."
----------------------------------------------------------
\cc
.sp 4
.ne 12
.fi
.SECT 1 A.7 Defining New Commands (Macros)
.nf
.sp
.cc \
\sp
----------------------------------------------------------
@DEF
break: no
Define a macro command - ends at ".en".
----------------------------------------------------------
@ENM
break: no
End the macro definition.
----------------------------------------------------------
\cc
.bp
.fi
.SECT 1 A.8 Miscellaneous Commands
.nf
.sp
.cc \
\sp
----------------------------------------------------------
@VSET
break: no
Set variable to text.
----------------------------------------------------------
@VGET
break: no
Set variable interactively, using text
as prompt.
----------------------------------------------------------
@VRG
initial: 0 break: no
Set number register (a-z) to n.
----------------------------------------------------------
@CCHAR
default: "." initial: "." break: no
Set command control character.
----------------------------------------------------------
@ECHAR
default: "__" initial: "__" break: no
Set universal escape character.
----------------------------------------------------------
@FCHAR
default: "_@" initial: "_@" break: no
Set the variable and register flag char.
----------------------------------------------------------
@SOU
initial: input break: no
Switch input to file.
----------------------------------------------------------
@SAVE
break: yes
Save the current formatter context on
context stack.
----------------------------------------------------------
@RST
break: yes
Restore the formatter context from context
stack.
----------------------------------------------------------
@LEX
break: no
Rename a command.
----------------------------------------------------------
\cc
.bp
.fi
.SECT 1 A.8 Miscellaneous Commands, continued
.nf
.sp
.cc \
\sp
----------------------------------------------------------
@APR
initial: no break: no
Enable auto-paragraphing.
----------------------------------------------------------
@NAP
initial: yes break: no
Disable auto-paragraphing.
----------------------------------------------------------
@MSG
break: no
Write a message to the console.
----------------------------------------------------------
@COMMENT
break: no
Enter a comment.
----------------------------------------------------------
@WRT
break: no
Write a special string to output. Line
length counter does not change.
----------------------------------------------------------
\cc
.comment
.! The table of contents is automatically generated and placed
.! here in the document file. It should be physically moved to
.! after the title page after printing the document.
.comment
.bp 2
.pn lower_roman #
.ce
.ul
Table of Contents
.sp 2
.pc
.sp 10
.ne 20
.ce
.ul
List of Figures
.sp 2
.PRFIG
.comment
.! This is provided in case the table of contents ends on an odd
.! page number.
.comment
.bp
.sp 20
.ce
This page intentionally blank
--::::::::::
--ptfsumid.ptf
--::::::::::
.comment
.! Index to Software User's Manual (2167A, DI-MCCR-80019A) for:
.! PORTABLE TEXT FORMATTER (PTF)
.! Prepared by: Richard Conn
.! Date: 5/7/90
.! Modifications
.! 08/18/89 1.0 Rick Conn Initial Version
.! 02/27/90 1.1 Rick Conn PTFPCR-01 to PTFPCR-04
.! 05/07/90 1.2 Rick Conn PTFPCR-05 to PTFPCR-06
.!
.! Description and Purpose:
.! 1. The Software User's Manual (SUM) provides user personnel
.! with instructions sufficient to execute one or more related
.! Computer Software Configuration Items (CSCIs).
.! 2. The SUM provides the steps for executing the software, the
.! expected output, and the measures to be taken if error messages
.! appear.
.! 3. The information required by this DID (Data Item Descriptor)
.! is directed to the functional user of the CSCI(s), as opposed
.! to the operator of the computer system. If this distinction does
.! not exist, the user will need to refer to both the Computer
.! System Operator's Manual and the SUM to operate the computer system
.! and to use the CSCI(s).
.!
.! Tailoring Instructions:
.! To tailor this template, fill in the areas surrounded by
.! [] as indicated.
.comment
.comment
.! This is set for PICA type (10 chars/inch). Change accordingly
.! for ELITE or other type styles. Also, the default top and bottom
.! margins and headers are used, giving 1 inch top and bottom for
.! both margins and headers at 6 lines/inch. No auto-paragraphing.
.comment
.lm 11
.rm 70
.comment
.! Set the page heading to contain the Document Control
.! Number and date. The Document Control Number contains
.! revision and volume identification as applicable.
.! PTF 1.2 Software User's Manual
.comment
.he //PTF 1.2 Software User's Manual//
.fo //Index-#//
.comment
.! The PTFIDX.PTF file generated by PTFIDX.
.! Be sure to edit the file named below in case any dot commands are
.! a part of the index.
.comment
.include ptfidx.ptf
--::::::::::
--ptfvdd.ptf
--::::::::::
.comment
.! Version Description Document (2167A, DI-MCCR-80013A) for:
.! Portable Text Formatter (PTF)
.! Prepared by: Richard Conn
.! Date: 5/7/90
.! Modifications
.! 08/24/89 1.0 Rick Conn Initial Version
.! 02/27/90 1.1 Rick Conn PTFPCR-1 to PTFPCR-4 Fixes
.! 05/07/90 1.2 Rick Conn PTFPCR-5 and PTFPCR-6 Fixes
.!
.! Description and Purpose:
.! 1. The Version Description Document (VDD) identifies and describes
.! a version of a Computer Software Configuration Item (CSCI).
.! 2. The VDD isused by the contractor to release CSCI versions to
.! the Government. The term "version" may be applied to the initial
.! release of a CSCI, to a subsequent release of that CSCI, or to one
.! of multiple forms of the CSCI released at approximately the same
.! time (e.g., to different sites).
.! 3. The VDD is used by the Government to track and control versions
.! of software to be released to the operational environment.
.!
.! Tailoring Instructions:
.! To tailor this template, fill in the areas surrounded by
.! [] as indicated.
.comment
.comment
.! This is set for PICA type (10 chars/inch). Change accordingly
.! for ELITE or other type styles. Also, the default top and bottom
.! margins and headers are used, giving 1 inch top and bottom for
.! both margins and headers at 6 lines/inch. No auto-paragraphing.
.comment
.lm 11
.rm 70
.comment
.! The following reads in a set of macros used by all the 2167A
.! document templates.
.comment
.include zzz2167a.ptf
.comment
.! Set the page heading to contain the Document Control
.! Number and date. The Document Control Number contains
.! revision and volume identification as applicable.
.comment
.he //PTF 1.2 Version Description Document//
.ce on
.comment
.! The next line contains the revision indicator and the
.! date of revision.
.comment
Version 1.2: 7 May 1990
.spaceto +15
VERSION DESCRIPTION DOCUMENT
.sp
FOR THE
.sp
.comment
.! The name of the CSCI appears here
.comment
PORTABLE TEXT FORMATTER (PTF)
.. .sp
.. OF
.. .sp
.comment
.! The name of the system appears here
.comment
.. [SYSTEM NAME]
.spaceto -20
.comment
.! The contract number and other information appear here
.comment
CONTRACT NO. <None>
.sp
CDRL SEQUENCE NO. <None>
.sp 2
Prepared for:
.sp
Ada Software Repository
Host Computer WSMR-SIMTEL20.ARMY.MIL
White Sands Missile Range, New Mexico
.sp 2
Prepared by:
.sp
Richard Conn
.ce off
.comment
.! The next page starts with the Scope and is numbered 1.
.! The table of contents is created at the end of the PTF
.! output file and should be inserted after this title page.
.comment
.bp 1
.fo //#//
.cl
.SECT 0 1. Scope
.SECT 1 1.1 Identification
.PP
This document is the Version Description Document for the
.ul
Portable Text Formatter
(PTF), Version 1.2. This document applies to the PTF as it operates on
any hardware platform to which a validated Ada compiler targets.
.SECT 1 1.2 System overview
.include ptfover.ptf
.SECT 1 1.3 Documentation overview
.PP
This purpose of this document is to define the files associated with
the Version 1.2 release of PTF and to instruct the reader in the procedure
for compiling the Ada source code of PTF.
.bp
.cl
.SECT 0 2. Referenced documents
.PP
Richard Conn,
.ul
PTF 1.2 Software User's Manual,
7 May 1990. This manual is a part of the distribution of PTF 1.2
and can be found in the Ada Software Repository.
.bp
.cl
.SECT 0 3. Version description
.SECT 1 3.1 Inventory of materials released
.PP
The following files comprise the release of this CSCI:
.sp
.nf
.li +5
.ul
Filename Comments
cli2.src Command line interfaces
ptfread.me Short READ.ME file
ptfspec.src PTF package specifications
ptfbody.src PTF package bodies
ptfmain.src PTF and PTFIDX mainlines
ptfdocs.src PTF documentation (raw form)
ptftest.src PTF unit test programs
ptf.sum PTF Software User's Manual
ptfindex.sum Index to PTF Software User's Manual
ptf.sdd PTF Software Design Document
ptf.vdd PTF Version Description Document
ptf.exe Executable of Ptf for MSDOS Systems*
ptfidx.exe Executable of Ptf for MSDOS Systems*
ptf.zip ZIP file containing all of the above*
.li -5
.fi
.PP
*The *.EXE and *.ZIP files are in the MSDOS archives only.
All other files are in both the Ada Software Repository.
.PP
CLI2.SRC contains a command line interface package specification and
various package bodies for various target environments.
.PP
PTFSPEC.SRC contains the specifications of the various packages and
stand-alone procedures which make up PTF. These specifications are
stored in compilation order.
.PP
PTFBODY.SRC contains the
bodies of the various packages which make up PTF. These bodies are stored
in compilation order.
.PP
PTFMAIN.SRC contains the source to the mainline procedures Ptf and Ptfidx.
Compile this file after compiling the appropriate CLI files, PTFSPEC.SRC,
and PTFBODY.SRC.
.PP
PTFDOCS.SRC contains the *.PTF files which make up the
.ul
Software User's Manual,
the
.ul
Software Design Document,
the
.ul
Version Description Document,
and the Problem/Change Reports
for PTF (these files must be processed by PTF).
.PP
PTFTEST.SRC contains unit test programs for many of the component
packages and procedures within PTF. PTFSPEC.SRC and PTFBODY.SRC
should be compiled before compiling the test programs in PTFTEST.SRC.
.sp
.SECT 1 3.2 Inventory of CSCI contents
.PP
The following is an alphabetical listing of the individual
software component files which comprise the PTF CSCI. These component
files are contained within the delivered files CLI2.SRC,
PTFSPEC.SRC, and PTFBODY.SRC.
.li +5
.sp
.nf
.ul
In CLI2.SRC (this may change as CLI2 is updated):
.sp
.ec \
.ul
Filename Comments
cli.ada CLI reused from ASR
clialsys.ada for Alsys Ada
clicais.ada for CAIS interface
cligenrl.ada for anything else
cliintgr.ada for IntegrAda (Janus Ada)
climerdn.ada for Meridian Ada
cliverdx.ada for Verdix Ada
clivms.ada for DEC Ada
.sp 2
.ul
In PTFSPEC.SRC and PTFBODY.SRC:
.sp
.ul
Filename Comments
clp.a Reused from ASR
clp_body.a Reused from ASR
cmd.a
cmd_body.a
cmd_sym.a
cnt.a
cnt_body.a
cot.a
cot_body.a
dyn.a Reused from ASR
env.a
env_body.a
err.a
err_body.a
fof.a
fof_body.a
idx.a
idx_body.a
in.a
in_body.a
mac.a
mac_body.a
out.a
out_body.a
parse.a
sort.a Reused from ASR
var.a
var_body.a
wp.a
wp_body.a
.sp 2
.ul
In PTFMAIN.SRC:
.sp
.ul
Filename Comments
ptf.a PTF mainline procedure
ptfidx.a PTFIDX mainline procedure
.sp 2
.ul
In PTFDOCS.SRC:
.sp
.ul
Filename Comments
ptfsum.ptf Software User's Manual
ptfsumid.ptf Index for Software User's Manual
ptfvdd.ptf Version Description Document
ptfsdd.ptf Software Design Document
ptfacr.ptf Acronym list
ptfover.ptf Overview
zzz2167a.ptf General-purpose macros
ptfpcr01.ptf Problem/Change Report 1
ptfpcr02.ptf Problem/Change Report 2
ptfpcr03.ptf Problem/Change Report 3
ptfpcr04.ptf Problem/Change Report 4
ptfpcr05.ptf Problem/Change Report 5
ptfpcr06.ptf Problem/Change Report 6
.sp 2
.ul
In PTFTEST.SRC:
.sp
.ul
Filename Comments
err_test.a Test Error_Log
foftest1.a Test Formatted_Output_File
foftest2.a "
foftest3.a "
foftest4.a "
mac_test.a Test Macro
parsetst.a Test Parse
var_test.a Test Variable
wp_test.a Test Word_Processor
foftest2.inp Data file for FOFTEST2.A
wptest1.in Data file for WP_TEST.A
wptest2.in "
wptest2a.in "
wptest2b.in "
wptest3.in "
wptest4.in "
wptest5.in "
wptest6.in "
.li -5
.fi
.SECT 1 3.3 Class I changes installed
.PP
PTF-05 documents a Priority 1 change installed in this release.
.SECT 1 3.4 Class II changes installed
.PP
No Priority 2 changes have been installed. All other changes, in
PTF-01 to PTF-04 and PTF-06 are Priority 4 changes.
.SECT 1 3.5 Adaptation data
.PP
The package CLI (Command Line Interface) contains the only system-dependent
information. The file CLI2.SRC contains the package specification of CLI
and several different package bodies, each unique for a particular
installation. The file CLIGENRL.ADA in CLI2.SRC is a general-purpose
body which should be used if no other body is applicable.
.PP
The file CLI2.SRC in PD2:<ADA.COMPONENTS> in the Ada Software Repository
is the most current version of this package. Users of the ASR should
keep up to date with improvements on this package as they come out if
the version of this package in the distribution does not meet the needs
of the user.
.SECT 1 3.6 Interface compatibility
.PP
The interface to this revision of PTF is compatible with previous interfaces.
Some new command line options have been added.
.SECT 1 3.7 Bibliography of reference documents
.PP
Documents prepared by Richard Conn for this release of PTF:
.li +5
.LIST 4
.LE PTF 1.2 Software Design Document
.LE PTF 1.2 Software User's Manual
.LE PTF 1.2 Version Description Document
.ELIST
.li -5
.SECT 1 3.8 Summary of change
.PP
This Version Description Document (VDD) covers the following
Problem/Change Reports:
.sp
.li +10
.nf
.ul
Report ID File Name
PTF-01 ptfpcr01.ptf
PTF-02 ptfpcr02.ptf
PTF-03 ptfpcr03.ptf
PTF-04 ptfpcr04.ptf
PTF-05 ptfpcr05.ptf
PTF-06 ptfpcr06.ptf
.fi
.li -10
.PP
See PTF-01 to PTF-06 for details on the changes incorporated into this
revision.
.SECT 1 3.9 Installation instructions
.PP
The installation of the PTF System amounts to compiling the two programs,
Ptf and Ptfidx, and placing both of these in an area of the target system
which can be accessed by the users.
.PP
To compile Ptf and Ptfidx, take the following steps. Note that the file names
of these file may be changed in order to perform the Ada compilations
(e.g., Verdix Ada requires that all Ada source files end in ".a").
.li +5
.LIST 4
.LE Set up a Working Directory
.PP
This directory should contain the following at a minimum:
.li +5
.SLIST 4
.SLE Contents of CLI2.SRC as separate files
.SLE PTFSPEC.SRC
.SLE PTFBODY.SRC
.SLE PTFMAIN.SRC
.ESLIST
.li -5
.LE Create an Ada Program Unit Library.
.PP
Virtually all Ada compilers require that this be done first.
.LE Compile CLI.ADA
.PP
This is the specification to the package Cli, which is contained
in the file CLI2.SRC.
.LE Compile the appropriate body of CLI
.PP
Select the package body appropriate for your target and compile it.
Instructions are included in the file CLI2.SRC.
.LE Compile PTFSPEC.SRC
.PP
This file contains all of the package specifications and stand-alone
subprograms in compilation order. These component files, in compilation
order, are:
.sp
.li +5
.nf
.na
clp.a
dyn.a
sort.a
cot.a
in.a
out.a
cmd_sym.a
err.a
idx.a
var.a
parse.a
fof.a
cnt.a
env.a
mac.a
cmd.a
wp.a
.ap
.fi
.li -5
.PP
If your Ada compiler does not have the capacity to compile a file as large
as PTFSPEC.SRC, it will be necessary to extract the component files
(the PAGER2 tool in the Ada Software Repository or a text editor can do this)
and compile them individually.
.LE Compile PTFBODY.SRC
.PP
This file contains all of the package bodies in compilation order.
These component files, in compilation order, are:
.sp
.li +5
.nf
.na
clp_body.a
cmd_body.a
cnt_body.a
cot_body.a
env_body.a
err_body.a
fof_body.a
idx_body.a
in_body.a
mac_body.a
out_body.a
var_body.a
wp_body.a
.ap
.fi
.li -5
.PP
If your Ada compiler does not have the capacity to compile a file as large
as PTFBODY.SRC, it will be necessary to extract the component files
(the PAGER2 tool in the Ada Software Repository or a text editor can do this)
and compile them individually.
.LE Compile PTFMAIN.SRC
.PP
This file contains PTF.A and PTFIDX.A, the two mainline procedures.
.LE Bind Ptf and Ptfidx
.PP
This will create the executables Ptf and Ptfidx. The names of the mainline
procedures are "Ptf" and "Ptfidx."
.ELIST
.li -5
.SECT 1 3.10 Possible problems and known errors
.PP
There are no known problems or errors with this CSCI.
.bp
.cl
.SECT 0 4. Notes
.SECT 1 4.1 Acronyms
.include ptfacr.ptf
.bp 1
.pn arabic A-#
.cl
.SECT 0 A Sample Compilation/Binding Command Sequences
.SECT 1 A.1 Janus/Ada or IntegrAda (IBM PC clone platform)
.PP
The distribution of PTF in the ARC file contains two EXE files, PTF.EXE
and PTFIDX.EXE. These files are ready to run on an IBM PC clone
without any further effort. The following instructions are provided for
those who wish to produce these EXE files themselves by compiling the
source code.
.SECT 2 A.1.1 Create a program unit library
.PP
This step is not necessary for Janus/Ada or IntegrAda.
.SECT 2 A.1.2 Compile CLI.ADA
.sp
.nf
compile cli.ada /o1 /d /t /z
.fi
.SECT 2 A.1.3 Compile the appropriate CLI body
.sp
.nf
compile cliintgr.ada /o1 /d /t /z
.fi
.SECT 2 A.1.4 Compile PTFSPEC.SRC
.sp
.nf
compile ptfspec.src /o1 /d /t /z
.fi
.SECT 2 A.1.5 Compile PTFBODY.SRC
.PP
PTFBODY.SRC is too large for this compiler to handle as a single file.
It must be broken into its components (by using the PAGER2 tool in the
Ada Software Repository or a text editor), and the component files must
be compiled separately. Also, since these are all package bodies, the
compilation order is not important (it is presented alphabetically below).
.sp
.nf
compile clp_body.a /o1 /d /t /z
compile cmd_body.a /o1 /d /t /z
compile cnt_body.a /o1 /d /t /z
compile cot_body.a /o1 /d /t /z
compile env_body.a /o1 /d /t /z
compile err_body.a /o1 /d /t /z
compile fof_body.a /o1 /d /t /z
compile idx_body.a /o1 /d /t /z
compile in_body.a /o1 /d /t /z
compile mac_body.a /o1 /d /t /z
compile out_body.a /o1 /d /t /z
compile var_body.a /o1 /d /t /z
compile wp_body.a /o1 /d /t /z
.fi
.SECT 2 A.1.6 Compile PTFMAIN.SRC
.sp
.nf
compile ptfmain.src /o1 /d /t /z
.fi
.SECT 2 A.1.7 Bind Ptf and Ptfidx
.sp
.nf
bind ptf /o1 /t
bind ptfidx /o1 /t
.fi
.SECT 1 A.2 Verdix Ada (Sun workstation platform)
.PP
The main thing to note below is that all file names of those files to
be compiled must end in a ".a".
.SECT 2 A.2.1 Create a program unit library
.sp
.nf
a.mklib -i
<< select the desired Ada compiler >>
.fi
.SECT 2 A.2.2 Compile CLI.ADA
.sp
.nf
mv cli.ada cli.a
ada cli.a
.fi
.SECT 2 A.2.3 Compile the appropriate CLI body
.sp
.nf
mv cliverdx.ada cliverdx.a
ada cliverdx.a
.fi
.SECT 2 A.2.4 Compile PTFSPEC.SRC
.sp
.nf
mv ptfspec.src ptfspec.a
ada ptfspec.a
.fi
.SECT 2 A.2.5 Compile PTFBODY.SRC
.sp
.nf
mv ptfbody.src ptfbody.a
ada ptfbody.a
.fi
.SECT 2 A.2.6 Compile PTFMAIN.SRC
.sp
.nf
mv ptfmain.src ptfmain.a
ada ptfmain.a
.fi
.SECT 2 A.2.7 Bind Ptf and Ptfidx
.sp
.nf
a.ld -o ptf ptf
a.ld -o ptfidx ptfidx
.fi
.SECT 1 A.3 DEC Ada (VAX/VMS platform)
.SECT 2 A.3.1 Create a program unit library
.PP
These steps create a subdirectory called [.LIB] as the program unit library.
.sp
.nf
acs cre lib [.lib]
acs set lib [.lib]
.fi
.SECT 2 A.3.2 Compile CLI.ADA
.sp
.nf
ada cli.ada
.fi
.SECT 2 A.3.3 Compile the appropriate CLI body
.sp
.nf
ada clivms.ada
.fi
.SECT 2 A.3.4 Compile PTFSPEC.SRC
.sp
.nf
ada ptfspec.src
.fi
.SECT 2 A.3.5 Compile PTFBODY.SRC
.sp
.nf
ada ptfbody.src
.fi
.SECT 2 A.3.6 Compile PTFMAIN.SRC
.sp
.nf
ada ptfmain.src
.fi
.SECT 2 A.3.7 Bind Ptf and Ptfidx
.sp
.nf
acs link ptf
acs link ptfidx
.fi
.PP
At this point, the current directory contains the executable files PTF.EXE
and PTFIDX.EXE. To run these programs, symbols must be defined during
each session before the programs are executed. The user should put
commands like the following into his LOGIN.COM file:
.sp
.nf
ptf:==$disk:[dir.subdir]ptf
ptfidx:==$disk:[dir.subdir]ptfidx
.fi
.PP
In the example above, "disk:[dir.subdir]" names the disk and directory
(with subdirectory if needed) in which the files PTF.EXE and PTFIDX.EXE
reside.
.bp
.sp 20
.ce
This Page Intentionally Blank
.bp 1
.pn arabic B-#
.cl
.SECT 0 B Building the PTF Documents
.PP
This appendix shows the PTF System commands used to build the files
PTF.SUM, PTFINDEX.SUM, PTF.SDD, and PTF.VDD.
.SECT 1 B.1 Building PTF.SUM and PTFINDEX.SUM
.PP
To build PTF.SUM and PTFINDEX.SUM, the following commands were issued:
.li +5
.LIST 4
.LE ptf ptfsum.ptf ptf.sum
.LE ptfidx
.LE emacs ptfidx.ptf
.LE ptf ptfsumid.ptf ptfindex.sum
.LE rm ptfidx.ptf
.ELIST
.li -5
.PP
The "emacs" command was used to edit the file "ptfidx.ptf" because some
of the index entries contained dot commands. While in the editor,
".cc \" and "\cc" commands were place around (before and after)
that part of the index.
.PP
The "rm" command deletes the remaining "ptfidx.ptf" file.
.SECT 1 B.2 Building PTF.SDD
.PP
The following command was issued to build the file "ptf.sdd":
.sp
.ce
ptf ptfsdd.ptf ptf.sdd
.SECT 1 B.3 Building PTF.VDD
.PP
The following command was issued to build the file "ptf.vdd":
.sp
.ce
ptf ptfvdd.ptf ptf.vdd
.bp
.sp 20
.ce
This Page Intentionally Blank
.comment
.! The table of contents is automatically generated and placed
.! here in the document file. It should be physically moved to
.! after the title page after printing the document.
.comment
.bp 2
.pn lower_roman #
.ce
.ul
Table of Contents
.sp 2
.pc
.comment
.! This is provided in case the table of contents ends on an odd
.! page number.
.comment
.bp
.sp 20
.ce
This page intentionally blank
--::::::::::
--ptfsdd.ptf
--::::::::::
.comment
.! Software Design Document (2167A, DI-MCCR-80012A) for:
.! Portable Text Formatter (PTF)
.! Prepared by: Richard Conn
.! Date: 2/27/90
.! Modifications
.! 08/24/89 1.0 Rick Conn Initial Version
.! 02/27/90 1.1 Rick Conn PTFPCR-1 to PTFPCR-4 Fixes
.! 05/07/90 1.2 Rick Conn PTFPCR-5 and PTFPCR-6 Fixes
.!
.! Description and Purpose:
.! 1. The Software Design Document (SDD) describes the complete design
.! of a Computer Software Configuration Item (CSCI). It describes the
.! CSCI as composed of Computer Software Components (CSCs) and Computer
.! Software Units (CSUs).
.! 2. The SDD describes the allocation of requirements from a CSCI to its
.! CSCs and CSUs. Prior to Preliminary Design Review, the SDD is entered
.! into the Developmental Configuration for the CSCI. Upon completion of
.! Physical Configuration Audit (PCA), the SDD, as part of the Software
.! Product Specification, is entered into the Product Baseline for the CSCI.
.! 3. The SDD is used by the contractor for three primary purposes, namely:
.! (1) present the preliminary design at the Preliminary Design Review(s),
.! (2) present the detailed design at the Critical Design Review(s), and
.! (3) use the design information as the basis for coding each CSU.
.! 4. The SDD is used by the Government to assess the preliminary and
.! detailed design of a CSCI.
.!
.! <<<< This PTF template is not stand-alone; refer to the DID >>>>
.!
.! Tailoring Instructions:
.! To tailor this template, fill in the areas surrounded by
.! [] as indicated.
.comment
.comment
.! These are global variables used in the document.
.comment
.vs IDXFILE ptf.idx
.vs PTFIDXFILE ptfidx.ptf
.vs TMPFILE ptfidx.tmp
.comment
.! This is set for PICA type (10 chars/inch). Change accordingly
.! for ELITE or other type styles. Also, the default top and bottom
.! margins and headers are used, giving 1 inch top and bottom for
.! both margins and headers at 6 lines/inch. No auto-paragraphing.
.comment
.lm 11
.rm 70
.comment
.! The following reads in a set of macros used by all the 2167A
.! document templates.
.comment
.include zzz2167a.ptf
.comment
.! Set the page heading to contain the Document Control
.! Number and date. The Document Control Number contains
.! revision and volume identification as applicable.
.comment
.he //PTF 1.2 Software Design Document//
.ce on
.comment
.! The next line contains the revision indicator and the
.! date of revision.
.comment
Version 1.2: 7 May 1990
.spaceto +15
SOFTWARE DESIGN DOCUMENT
.sp
FOR THE
.sp
.comment
.! The name of the CSCI appears here
.comment
PORTABLE TEXT FORMATTER (PTF)
.. .sp
.. OF
.. .sp
.comment
.! The name of the system appears here
.comment
.. [SYSTEM NAME]
.spaceto -20
.comment
.! The contract number and other information appear here
.comment
CONTRACT NO. <None>
.sp
CDRL SEQUENCE NO. <None>
.sp 2
Prepared for:
.sp
Ada Software Repository
Host Computer WSMR-SIMTEL20.ARMY.MIL
White Sands Missile Range, New Mexico
.sp 2
Prepared by:
.sp
Richard Conn
.ce off
.comment
.! The following sets the escape character from an underscore
.! (default) to a backslash. This is to remove the need to
.! double all underscores within file names.
.comment
.ec \
.comment
.! The next page starts with the Scope and is numbered 1.
.! The table of contents is created at the end of the PTF
.! output file and should be inserted after this title page.
.comment
.bp 1
.fo //#//
.cl
.SECT 0 1. Scope
.SECT 1 1.1 Identification
.PP
This document is the Software Design Document for the
.ul
Portable Text Formatter
(PTF), Version 1.2. This document applies to the PTF as it
operates on any hardware platform to which a validated Ada compiler
targets.
.SECT 1 1.2 System overview
.include ptfover.ptf
.SECT 1 1.3 Documentation overview
.PP
The purpose of this document is to outline the design of the
.ul
Portable Text Formatter
(PTF) in order to support its maintenance. Only the overall design
is discussed, and a detailed design is not presented. The reader is
referred to the source code of PTF, using the overall design information
in this document as a guide.
.bp
.cl
.SECT 0 2. Referenced documents
.PP
Richard Conn,
.ul
PTF 1.2 Software User's Manual,
7 May 1990. This manual is a part of the distribution of PTF 1.2
and can be found in the Ada Software Repository.
.PP
Ozan S. Yigit and Steven Tress,
.ul
PROFF User's Guide Version 1.0,
March 1984, SIMTEL20 archives.
.bp
.cl
.SECT 0 3. Preliminary design.
.PP
The PTF System is an object-oriented design written in Ada which
is composed of two related programs: the Portable Text Formatter (PTF)
and the Portable Text Formatter Indexer (PTFIDX). These top-level
objects are
further supported by the following interacting subordinate objects:
.li +5
.LIST 4
.LE Command_Line_Interface*
.LE Command_Line_Processor*
.LE Dynamic_String*
.LE Console
.LE Input_File
.LE Output_File
.LE Command_Symbols
.LE Error_Log
.LE Index
.LE Variable
.LE Formatted_Output_File
.LE Contents
.LE Environment
.LE Macros
.LE Command
.LE Word_Processor
.ELIST
.li -5
.PP
The following functions are also provided for general-purpose support:
.li +5
.LIST 4
.LE Parse
.LE Sort*
.ELIST
.li -5
.PP
The items marked with an asterisk (*) in the above lists were reused from
code available in the Ada Software Repository.
.SECT 1 3.1. CSCI overview.
.PP
The Portable Text Formatter program reads options, the names of input files,
the names of include files (which, in turn, contain the names of input files
and other include files), and the name of an output file from the command
line. It passes the name of the output file on to the Word_Processor object
followed by the names of each of the input files (including those referenced
by the include files) as they were encountered in the Command_Line_Interface
and the include files. The output file, as a formatted
document, and an optional index file named
"@IDXFILE" are created by the Portable Text Formatter.
.PP
If any commands to create index entries are present in any of the input files,
the "@IDXFILE" file is created. This file is read by the Portable Text
Formatter Indexer, which creates the file "@PTFIDXFILE" for final processing
by the Portable Text Formatter to create the index pages for the output file.
.SECT 2 3.1.1. CSCI architecture.
.SECT 3 3.1.1.1 Portable Text Formatter
.PP
The Portable Text Formatter is implemented as a procedure named "Ptf."
Ptf is composed of the following packages and subprograms:
.li +5
.LIST 4
.LE File_List
.LE Help_Message
.LE Is_File
.LE File_Count
.LE Process_Options
.LE Open_Output_File
.LE the mainline of Ptf
.ELIST
.li -5
.SECT 4 3.1.1.1.1 Objects referenced
.PP
Ptf interfaces with the following objects and functional entities.
.li +5
.LIST 4
.LE Command_Symbols
.LE Console
.LE Error_Log
.LE Index
.LE Output_File
.LE Variable
.LE Word_Processor
.ELIST
.li -5
.SECT 4 3.1.1.1.2 Non-developmental software
.PP
PTF interfaces with the following non-developmental objects and
functional entities.
They were acquired from the Ada Software Repository.
.li +5
.LIST 4
.LE Command_Line_Interface
.LE Command_Line_Processor
.ELIST
.li -5
.SECT 3 3.1.1.2 Portable Text Formatter Indexer
.PP
The Portable Text Formatter Index is implemented as a procedure named
"Ptfidx." Ptfidx is composed of the following packages and subprograms:
.li +5
.LIST 4
.LE Help_Message
.LE Is_File
.LE Process_Options
.LE To_Nat
.LE To_Lower
.LE To_Upper (two versions)
.LE Pass1
.LE Pass2
.LE Pass3
.LE the mainline of Ptfidx
.ELIST
.li -5
.SECT 4 3.1.1.2.1 Objects referenced
.PP
Ptfidx interfaces with the following objects and functional entities.
.li +5
.LIST 4
.LE Command_Symbols
.LE Console
.LE Error_Log
.LE Input_File
.LE Output_File
.LE Sort
.LE Variable
.ELIST
.li -5
.SECT 4 3.1.1.2.2 Non-developmental software
.PP
Ptfidx interfaces with the following non-developmental objects and
functional entities.
They were acquired from the Ada Software Repository.
.li +5
.LIST 4
.LE Command_Line_Interface
.ELIST
.li -5
.SECT 2 3.1.2. System states and modes.
.SECT 3 3.1.2.1 Portable Text Formatter
.PP
Ptf transitions through the following states during its operation.
.li +2
.LIST 4
.LE Initialization
.PP
The Error_Log is opened to standard output (the Console), the file name
and line number variables are initialized, the signon message is output to
the Console, and the Command_Line_Interface is initialized.
.LE Process Command Line Options
.PP
Each token in the command line is examined for a leading dash (-), and,
if one is found, it is processed as an option.
.LE Further Initialization
.PP
If the help message was not displayed during the processing of the
command line options, then the error log file is opened (if error logging
was requested by a command line option) and the list of files to process
is initialized.
.LE Blank Help Display
.PP
If there were no arguments on the command line, the help message is
displayed.
.LE Main Processing Activity
.PP
If the help message was not requested, if all options were valid, and
if two or more files were specified in the command line (an input file
and an output file, as a minimum), then the main processing activity begins.
.SLIST 4
.SLE Open the output file
.PP
If the output file is opened successfully, the Main Processing Activity
continues.
.SLE Write the name of the output file to the console.
.SLE Loop through the tokens provided by the Command_Line_Interface.
.PP
For each file name token (which does not begin with a dash), add it
to the file list. Include files, which begin with an ampersand (\@),
are processed.
.SLE Process each input file
.PP
Loop through the list of files created by the previous step, passing
their names to the Word_Processor.
.SLE Close the output file of the Word_Processor.
.ESLIST
.LE Close the Error_Log and Index
.ELIST
.li -2
.SECT 3 3.1.2.2 Portable Text Formatter Indexer
.PP
Ptfidx transitions through the following states during its operation.
.li +2
.LIST 4
.LE Initialization
.PP
The Error_Log is opened to standard output (the Console), the file name
and line number are initialized, the signon message is displayed at the
Console, and the Command_Line_Interface is initialized.
.LE Process Command Line Options
.PP
Each token in the command line is examined and processed as an option
if it begins with a dash (-). The only option recognized by
Ptfidx is the help message request.
.LE Main Processing Activity
.PP
If the help message was not requested, the Main Processing Activity begins.
.SLIST 4
.SLE Pass1
.PP
Pass1 is the initial processing on the "@IDXFILE" file.
It determines the values of Total_Line_Length, Index_Length, and
Element_Count (internal variables) and creates the "@TMPFILE" (which
contains the "@IDXFILE" with the duplicate entries removed).
.SLE Pass2
.PP
Pass2 reads in the index entries from the "@TMPFILE" file, sorts them,
and builds a new "@TMPFILE" as its output. It deletes the first
version of "@TMPFILE" and creates a new version, suitable for use by Pass3.
.SLE Pass3
.PP
Pass3 reads in the single
column of index entries from "@TMPFILE" and generates the dual-column
output file "@PTFIDXFILE." "@TMPFILE" is deleted.
.SLE Delete the input file "@IDXFILE"
.SLE Display the "processing complete" message
.ESLIST
.LE Close the Error_Log
.ELIST
.li -2
.SECT 2 3.1.3. Memory and processing time allocation.
.PP
This data is not significant for the successful operation of the tool and
is machine-dependent on both the target environment and the Ada compiler
used. This data is not provided.
.SECT 1 3.2. CSCI design description.
.PP
This section discusses the following CSCs (Computer Software Components).
.li +5
.LIST 4
.LE Console
.LE Input_File
.LE Output_File
.LE Command_Symbols
.LE Error_Log
.LE Index
.LE Variable
.LE Parse
.LE Formatted_Output_File
.LE Contents
.LE Environment
.LE Macro
.LE Command
.LE Word_Processor
.ELIST
.li -5
.PP
The design descriptions which follow are brief summaries of the information
available in the associated package and subprogram specifications.
.SECT 2 3.2.1 Console
.SECT 3 3.2.1.1 Purpose
.PP
Console implements an abstract state machine of a console terminal.
Console offers an abstraction that can be made more efficient
by not using Text_IO (and having its associated overhead imposed)
if possible.
.SECT 3 3.2.1.2 Data Types, Constants, and Variables
.PP
None
.SECT 3 3.2.1.3 Methods
.li +5
.LIST 4
.LE Put (Character and String)
.LE Put_Line
.LE New_Line
.LE Get_Line
.ELIST
.li -5
.SECT 3 3.2.1.4 Exceptions Raised
.PP
None
.SECT 2 3.2.2 Input_File
.SECT 3 3.2.2.1 Purpose
.PP
Input_File implements an abstract data type of an input file.
Input_File offers an abstraction that can be made more efficient by
not using Text_IO (and having its associated overhead imposed)
if possible.
.SECT 3 3.2.2.2 Data Types, Constants, and Variables
.PP
File_Type
.SECT 3 3.2.2.3 Methods
.li +5
.LIST 4
.LE Open
.LE Get_Line
.LE End_Of_File
.LE Close
.ELIST
.li -5
.SECT 3 3.2.2.4 Exceptions Raised
.PP
Cannot_Open_Input_File
.PP
Read_Error
.SECT 2 3.2.3 Output_File
.SECT 3 3.2.3.1 Purpose
.PP
Output_File implements an abstract data type of an output file.
Output_File offers an abstraction that can be made more efficient
by not using Text_IO (and having its associated overhead imposed)
if possible and also offers the ability to suppress the output,
which may be desired if a caller is skipping over pages and
just wants to output to a null device during this process.
.SECT 3 3.2.3.2 Data Types, Constants, and Variables
.PP
File_Type
.SECT 3 3.2.3.3 Methods
.li +5
.LIST 4
.LE Already_Exists
.LE Delete
.LE Create
.LE Put
.LE Put_Line
.LE New_Line
.LE New_Page
.LE Enable_Output
.LE Disable_Output
.LE Close
.ELIST
.li -5
.SECT 3 3.2.3.4 Exceptions Raised
.PP
Cannot_Create_Output_File
.PP
Write_Error
.SECT 2 3.2.4 Command_Symbols
.SECT 3 3.2.4.1 Purpose
.PP
Command_Symbols contains the command name table used by the body of
package Command. It also contains all the error messages issued by
routines which output to the Error_Log.
.SECT 3 3.2.4.2 Data Types, Constants, and Variables
.li +5
.LIST 4
.LE Command_Text_Length (Constant)
.PP
This is the maximum length of the text of a command verb. If this value
is changed, the table entries in Cl must be changed as well.
.LE Ltw_Length (Constant)
.LE COMMAND_ID (Type)
.PP
This is an enumeration type which uniquely names each of the commands
recognized by the package Command.
.LE COMMAND_TEXT (Type)
.PP
COMMAND_TEXT is a string of length Command_Text_Length.
.LE COMMAND_DEFINITION (Type)
.PP
COMMAND_DEFINITION is a record containing a COMMAND_ID and a COMMAND_TEXT.
It is used to define each of the command verbs.
.LE COMMAND_LIST (Type)
.PP
COMMAND_LIST is a vector of COMMAND_DEFINITION objects.
.LE Cl (Variable)
.PP
Cl is of type COMMAND_LIST and contains all recognized commands.
It is a variable rather than a constant so that command names may be changed.
.LE Error_* (Constant)
.PP
These are the general-purpose and internal error messages. They include
a paragraph number in the
.ul
PTF 1.2 Software User's Manual
which discusses the error.
.LE Warning_* (Constant)
.PP
These are the warning messages. They include a paragraph number in the
.ul
PTF 1.2 Software User's Manual
which discusses the warning.
.ELIST
.li -5
.SECT 3 3.2.4.3 Methods
.PP
None
.SECT 3 3.2.4.4 Exceptions Raised
.PP
None
.SECT 2 3.2.5 Error_Log
.SECT 3 3.2.5.1 Purpose
.PP
Error_Log is used to log error message and warning messages to an output
file or standard output (the console).
.SECT 3 3.2.5.2 Data Types, Constants, and Variables
.PP
None
.SECT 3 3.2.5.3 Methods
.li +5
.LIST 4
.LE Open
.LE Write_Error
.LE Write_Warning
.LE Close
.ELIST
.li -5
.SECT 3 3.2.5.4 Exceptions Raised
.PP
None
.SECT 2 3.2.6 Index
.SECT 3 3.2.6.1 Purpose
.PP
Index is an abstract state machine which implements an index of a document.
.SECT 3 3.2.6.2 Data Types, Constants, and Variables
.PP
None
.SECT 3 3.2.6.3 Methods
.li +5
.LIST 4
.LE Create
.LE Add_Entry
.LE Close
.ELIST
.li -5
.SECT 3 3.2.6.4 Exceptions Raised
.PP
Index_File_Not_Open
.PP
Create_Error
.SECT 2 3.2.7 Variable
.SECT 3 3.2.7.1 Purpose
.PP
Variable defines and provides access to the following variables:
.li +5
.LIST 4
.LE Number registers a-z
.LE Command control character (CC)
.LE Escape character (EC)
.LE Flag character (FC)
.LE Auto-Paragraphing flag
.LE Bold line, center line, and underlined line counts
.LE Current file name and line number
.LE User-defined text variables
.ELIST
.li -5
.SECT 3 3.2.7.2 Data Types, Constants, and Variables
.li +5
.LIST 4
.LE Default_Auto_Paragraph (Constant)
.LE Default_Cc (Constant)
.LE Default_Ec (Constant)
.LE Default_Fc (Constant)
.LE NREG (Type)
.ELIST
.li -5
.SECT 3 3.2.7.3 Methods
.li +5
.LIST 4
.LE Set_Auto_Paragraph
.LE Is_Auto_Paragraph
.LE Set_Bold_Count
.LE Bold_Count
.LE Set_Center_Count
.LE Center_Count
.LE Set_Underline_Count
.LE Underline_Count
.LE Set_Cc
.LE Cc
.LE Set_Ec
.LE Ec
.LE Set_Fc
.LE Fc
.LE Set_Nr
.LE Nr (as a NATURAL and as a STRING)
.LE Set_Var
.LE Var (as a function and as a procedure)
.LE Set_File_Name
.LE Get_File_Name
.LE Set_Line_Number
.LE Increment_Line_Number
.LE Line_Number
.ELIST
.li -5
.SECT 3 3.2.7.4 Exceptions Raised
.PP
None
.SECT 2 3.2.8 Parse
.SECT 3 3.2.8.1 Purpose
.PP
Parse parses the input string, which does not begin with a dot, into
the strings Command_Verb and Command_Tail. Verb_Last and Tail_Last are
set to the index of the last valid character. Command_Verb starts with
the first character. Command_Tail starts with the first non-blank character
after the verb. The string Item is of the form:
.sp
.ce
command_verb command_tail
.sp
.SECT 3 3.2.8.2 Data Types, Constants, and Variables
.PP
None
.SECT 3 3.2.8.3 Methods
.PP
None -- this is a procedure.
.SECT 3 3.2.8.4 Exceptions Raised
.PP
None
.SECT 2 3.2.9 Formatted_Output_File
.SECT 3 3.2.9.1 Purpose
.PP
Formatted_Output_File manipulates text, placing
text into the output file as it is received. Formatted_Output_File is
also used to define the format of the formatted text (number of lines
per page, header lines, etc.).
.SECT 3 3.2.9.2 Data Types, Constants, and Variables
.PP
FILE is the abstract data type managed as a Formatted_Output_File.
.PP
Constants:
.li +5
.LIST 4
.LE Maximum_Number_Of_Lines_On_Page
.LE Maximum_Line_Length
.PP
Note: this is an input line length.
The internal line length of the target line is five times this value.
.LE Maximum_Number_Of_Header_Footer_Lines
.PP
This is the number of header lines allowed.
It is also the number of footer lines allowed.
.LE Maximum_Number_Of_Pages
.PP
This is the size of the document which may be produced.
.LE Page_Attribute_Defaults
.PP
These are default values for the top margin, bottom margin, left margin, etc.
.LE Line_Attribute_Defaults
.PP
These are default values for bolding, centering, etc.
.LE Page_Number_Id_Default
.PP
This is the character that will be recognized as the page number in the
header and footer lines and in the table of contents and the index.
.ELIST
.li -5
.PP
Type definitions:
.li +5
.LIST 4
.LE PAGE_ATTRIBUTE
.PP
This is an enumeration type naming each of the page attributes
(top margin, etc.).
.LE LINE_ATTRIBUTE
.PP
This is an enumeration type naming each of the line attributes
(bold, etc.).
.LE PAGE_ATTRIBUTE_LIST
.LE OFF_ON
.LE LINE_ATTRIBUTE_LIST
.LE LINE_NUMBER
.LE HEADER_FOOTER_LINE
.LE PAGE_NUMBER
.LE STATUS
.PP
STATUS is returned by the Open method.
.LE PAGE_SIDE
.PP
PAGE_SIDE is used by the margin and indent setting methods.
.LE PAGE_KIND
.PP
PAGE_KIND is used by the header and footer setting methods.
.LE NUMERIC_FORMAT
.PP
NUMERIC_FORMAT is used for page numbers.
.ELIST
.li -5
.SECT 3 3.2.9.3 Methods
.li +5
.LIST 4
.LE Open
.LE Close
.LE Put_Invisible_Word
.LE Put_Word
.LE Put_Line
.LE Break_Line
.LE Current_Line
.LE Skip
.LE Break_Page (2 versions)
.LE Current_Page (2 versions)
.LE Set_Page_Number_Format (2 versions)
.LE Set_Page_Attribute
.LE Set_Line_Attribute
.LE Get_Page_Attribute
.LE Get_Line_Attribute
.LE Test_Page
.LE Set_Footer_Line
.LE Set_Header_Line
.LE Set_Page_Number_Id
.LE Page_Number_Format
.ELIST
.li -5
.SECT 3 3.2.9.4 Exceptions Raised
.PP
Range_Error
.PP
File_Not_Open
.SECT 2 3.2.10 Contents
.SECT 3 3.2.10.1 Purpose
.PP
Contents adds lines to the table of contents and prints the table of contents.
Once the table of contents has been printed, no more lines may be added to it.
.SECT 3 3.2.10.2 Data Types, Constants, and Variables
.PP
TABLE_NUMBER sets the number of tables of contents supported by this package.
.SECT 3 3.2.10.3 Methods
.li +5
.LIST 4
.LE Select_Table
.LE Add_Line
.LE Print
.ELIST
.li -5
.SECT 3 3.2.10.4 Exceptions Raised
.PP
None
.SECT 2 3.2.11 Environment
.SECT 3 3.2.11.1 Purpose
.PP
Environment provides a mechanism for saving the current environment
and then later restoring it. The environment consists of the
items named under the ".save" command in the
.ul
PTF 1.2 Software User's Manual.
.SECT 3 3.2.11.2 Data Types, Constants, and Variables
.PP
None
.SECT 3 3.2.11.3 Methods
.li +5
.LIST 4
.LE Pop
.LE Push
.ELIST
.li -5
.SECT 3 3.2.11.4 Exceptions Raised
.PP
None
.SECT 2 3.2.12 Macro
.SECT 3 3.2.12.1 Purpose
.PP
Macro is used to manipulate an abstract state machine which contains
a group of macro definitions. It provides routines for building new
macro definitions and extracting the lines from a macro definition.
.SECT 3 3.2.12.2 Data Types, Constants, and Variables
.PP
MACRO_ID is the abstract data type used by many of the methods below
to reference a particular macro.
.PP
MACRO_STATUS
.SECT 3 3.2.12.3 Methods
.li +5
.LIST 4
.LE Create
.LE Write
.LE Open
.LE Is_Empty
.LE Read
.LE Close
.LE Locate
.LE Define_Parameters
.ELIST
.li -5
.SECT 3 3.2.12.4 Exceptions Raised
.PP
Macro_Not_In_Add_Mode
.PP
Macro_Not_Open
.SECT 2 3.2.13 Command
.SECT 3 3.2.13.1 Purpose
.PP
Command provides all the command identification and processing functions
for the Word_Processor.
.SECT 3 3.2.13.2 Data Types, Constants, and Variables
.PP
None
.SECT 3 3.2.13.3 Methods
.li +5
.LIST 4
.LE Identify
.LE Process
.LE Disable_Bolding
.ELIST
.li -5
.SECT 3 3.2.13.4 Exceptions Raised
.PP
None
.SECT 2 3.2.14 Word_Processor
.SECT 3 3.2.14.1 Purpose
.PP
Word_Processor is an abstract state machine which reads one or more input
text files, processing text and commands from them,
placing the output into a common output file. The output file must be
opened before any of the input files are processed.
.SECT 3 3.2.14.2 Data Types, Constants, and Variables
.PP
OPERATION_STATUS
.SECT 3 3.2.14.3 Methods
.li +5
.LIST 4
.LE Open_Output_File
.LE Process_Source_File
.ELIST
.li -5
.SECT 3 3.2.14.4 Exceptions Raised
.PP
Output_File_Not_Open
.bp
.cl
.SECT 0 4. Detailed design.
.PP
The detailed design information called for by DoD-STD-2167A is omitted
from this document. The reader is referred to the source code, starting
with the Ada package specifications.
.bp
.cl
.SECT 0 5. CSCI data.
.PP
The global data elements are controlled by the packages Command_Symbols
and Variable.
.bp
.cl
.SECT 0 6. CSCI data files.
.PP
The following kinds of data files are manipulated by Ptf and Ptfidx:
.li +5
.LIST 4
.LE Input PTF source files
.LE Output ASCII text files
.LE @IDXFILE
.LE @PTFIDXFILE
.ELIST
.li -5
.SECT 1 6.1. Data file to CSC/CSU cross reference.
.PP
The following figure shows the disk files used in the PTF System.
.sp
.nf
.na
Input Output
PTF source ----> Ptf ----> ASCII text
Files | ^ Files
| |
@IDXFILE | | @PTFIDXFILE
V |
Ptfidx
.fi
.ap
.SECT 1 6.2. @IDXFILE Data File
.PP
The "@IDXFILE" data file is generated by Ptf if there are index entries
present in one or more Input PTF Source Files. This file is read and
processed by Ptfidx.
.SECT 1 6.3 @PTFIDXFILE Data File
.PP
The "@PTFIDXFILE" data file is generated by Ptfidx after processing
the "@IDXFILE" data file. "@PTFIDXFILE" can be processed by Ptf to
produce a dual-column index.
.bp
.cl
.SECT 0 7. Requirements traceability.
.PP
This section is omitted. The requirements document was the
.ul
PROFF User's Guide Version 1.0.
.bp
.cl
.SECT 0 8. Notes.
.SECT 1 8.1 Acronyms
.ec
.include ptfacr.ptf
.ec \
.comment
.! The table of contents is automatically generated and placed
.! here in the document file. It should be physically moved to
.! after the title page after printing the document.
.comment
.bp 2
.pn lower_roman #
.ce
.ul
Table of Contents
.sp 2
.pc
.comment
.! This is provided in case the table of contents ends on an odd
.! page number.
.comment
.bp
.sp 20
.ce
This page intentionally blank
--::::::::::
--ptfacr.ptf
--::::::::::
.sp
.nf
.nap
.li +5
.ul
Acronym Meaning
ASR Ada Software Repository
CDRL Contract Data Requirements List
CSCI Computer Software Configuration Item
DID Data Item Descriptor
DoD-STD-2167A
"Military Standard Defense System Software
Development"
FOF Formatted__Output__File
MIL-HDBK-1804
"Ada Style Guide"
PDL Program Design Language
PTF Portable Text Formatter
PTFIDX Portable Text Formatter Indexer
SIMTEL20 SIMulation and TELeprocessing DECSystem-20
WSMR White Sands Missile Range
WSMR-SIMTEL20.ARMY.MIL
name of host computer on which the
Ada Software Repository resides
.li -5
.fi
.ap
--::::::::::
--ptfover.ptf
--::::::::::
.PP
The
.ul
Portable Text Formatter
(PTF)
is a document formatting program, written in Ada, which can execute
on a variety of hardware platforms. PTF was designed to be as portable
as possible, so it should run on any platform supported by a validated
Ada compiler.
.PP
PTF reads one or more source text files which contain both commands to PTF
and text lines, and PTF
generates a formatted output file and (optionally)
a file containing index entries.
Commands to PTF are placed on lines whose first
character is a dot (this may be changed if desired), and
text lines are those lines whose first character is not a dot.
Commands to PTF instruct it to perform certain operations on the
formatted output file, such as set left margin, underline the
following words, place an entry into the table of contents, place an
entry into the index, and define a macro.
.PP
PTF was designed to meet several objectives:
.li +2
.LIST 4
.LE Generate DoD-STD-2167A documents.
.PP
PTF was designed specifically to support the generation of DoD-STD-2167A
documents, as detailed in the DoD-STD-2167A Data Item Descriptors (DIDs).
To this end, PTF supports multiple page heading lines, multiple page footer
lines, page numbers in a variety of formats (including Arabic and Roman
numeral), generation of
up to six distinct tables of contents (so that separate tables
for figures and diagrams may be created), and generation of an index.
.LE Support Ada software development.
.PP
PTF was written to provide a mechanism to support other Ada software
development tools, such as Ada PDL (Program Design Language) processors.
Output from these tools would be text files containing PTF commands.
Specifically, support of such tools to process PDL as defined in
MIL-HDBK-1804 is anticipated.
.LE Support team development of a document.
.PP
PTF also supports team development of a document, where individuals can
be given a common set of macros and instructions on their use, and PTF can
assemble a document in a common format from many different source files
which were independently created.
.LE Provide a documentation standard for the Ada Software Repository.
.PP
Many of the reusable documents in the
Ada Software Repository will be revised so they may be processed by PTF,
and many new documents will be released in a form that may be processed
by PTF.
.LE Port without modification to computers which have validated Ada compilers.
.PP
PTF is written in Ada and has been tested on a VAX, Sun, and PC platform
in an attempt to insure portability.
.ELIST
.li -2
.PP
PTFIDX is a companion program to PTF which processes its index pages.
.index PTFIDX
--::::::::::
--zzz2167a.ptf
--::::::::::
.comment
.! Useful Macros (note that macros are in upper-case):
.! .SECT <indentation level> <number> <text>
.! -- define a section which appears in the document and the
.! -- table of contents
.! .LIST <number of spaces to indent>
.! -- start a list of items; the list will be indented from the
.! -- right and left by the indicated number of spaces;
.! -- nothing is output by this macro -- only the indentation
.! -- is changed and the number of the next list element
.! -- is set
.! .LE <text>
.! -- enter a new list item into the list; this may be
.! -- followed by more lines containing text associated
.! -- with the list entry; a blank line is generated followed
.! -- by a list element number, a period, and <text> extended
.! -- to the left by the <number of spaces to indent> set by
.! -- the .LIST macro
.! .ELIST
.! -- end a list of items; the indentation set by .LIST is
.! -- unset; a break is issued
.! .SLIST <number of spaces to indent>
.! -- start a sublist of items while in a list; the sublist will
.! -- be further indented from the right and left by the
.! -- indicated number of spaces
.! .SLE <text>
.! -- enter a new list item into the sublist; this may be
.! -- followed by more lines containing text associated
.! -- with the sublist entry; a blank line is generated
.! -- followed by N.M (N=list element number, M=sublist number),
.! -- a period, and <text> extended to the left by the
.! -- <number of spaces to indent> set by the .SLIST macro
.! .ESLIST
.! -- end a sublist of items and continue with the list
.! .PP
.! -- skip a line and start a new paragraph, indented by 5
.! -- spaces
.comment
.!
.! Macro: SECT
.!
.define SECT
.contline @1 @2 @3 @4 @5 @6 @7 @8 @9
.sp 2
.ne 10
@2
.ul
@3 @4 @5 @6 @7 @8 @9
.br
.en
.!
.! Macro: LIST
.!
.define LIST
.vs LISTINDENT @1
.li +@LISTINDENT
.ri +@LISTINDENT
.nr a 0
.en
.!
.! Macro: LE
.!
.define LE
.sp
.ti -@LISTINDENT
.nr a +1
@na.
@1 @2 @3 @4 @5 @6 @7 @8 @9
.br
.en
.!
.! Macro: ELIST
.!
.define ELIST
.br
.li -@LISTINDENT
.ri -@LISTINDENT
.en
.!
.! Macro: SLIST
.!
.define SLIST
.vs SLISTINDENT @1
.li +@SLISTINDENT
.ri +@SLISTINDENT
.nr b 0
.en
.!
.! Macro: SLE
.!
.define SLE
.sp
.ti -@SLISTINDENT
.nr b +1
@na.@nb.
@1 @2 @3 @4 @5 @6 @7 @8 @9
.br
.en
.!
.! Macro: ESLIST
.!
.define ESLIST
.br
.li -@SLISTINDENT
.ri -@SLISTINDENT
.en
.!
.! Macro: PP
.!
.define PP
.sp
.ti +5
.en
--::::::::::
--ptfpcr01.ptf
--::::::::::
.comment
.! Problem/Change Report as per DoD-STD-2167A
.! This template is compliant with the requirements in the main
.! document of DoD-STD-2167A. This template may be readily altered
.! and still be compliant with DoD-STD-2167A since the guidelines
.! presented in the documentation are very general.
.comment
.vs SYSNAME Portable Text Formatter
.vs DATE 2 Apr 90
.vs ID PTF-01
.lm 11
.rm 70
.nlheader 3
.he 1 ''Problem/Change Report''
.he 2 /@SYSNAME/@ID/@DATE/
.nlfooter 2
.fo 2 //Page #//
.de PP
.sp
.ti +5
.en
.de SECT
.sp 2
.tp 10
------------------------------------------------------------
.nr s +1
Section @ns --
.ul
@1 @2 @3 @4 @5 @6 @7 @8 @9
.sp
.en
.nr s 0
.sp 2
.ce on
Problem/Change Report
.sp
for
.sp
@SYSNAME
.ce off
.sp 2
.SECT Software System Identification
.nf
System Name: @SYSNAME
Version Number: 1.0
Version Date (if known): Unknown
.fi
.SECT Identification of Person Reporting Problem
.nf
Name: Richard Conn
Address:
White Sands
Electronic Mail: rconn_@wsmr-simtel20.army.mil
Phone: N/A
.fi
.SECT Problem Classification and Description
.nf
Classification of Problem by Category
(Check all that apply):
Software Problem
Documentation Problem
X Design Problem
Classification of Problem by Priority
(Check all that apply, see Appendix A for descriptions):
Priority 1
Priority 2
Priority 3
X Priority 4
Priority 5
.fi
.sp 2
.tp 10
.ul
Description of Problem
.PP
When formatting PTF files to be displayed on a video screen
(for review prior to printing or for display to an audience),
the underlining of text obliterates the text, resulting in only
the underlining being displayed.
.PP
It is desirable to add a command-line option to disable underlining.
An option to disable bold facing already exists.
.SECT Corrective Action
.sp
.ul
Person to whom Corrective Action is assigned
.sp
.nf
Richard Conn
.fi
.sp
.ul
Recommended Corrective Action Needed to Resolve Problem
.sp
.PP
Add command-line options as follows:
.sp
.nf
-du to disable underlining
-da to disable both underlining and bold facing
.fi
.PP
Also add .du and .eu commands which may be processed internally.
.sp 2
.ul
Actions Actually Taken to Resolve Problem
.PP
The command-line options -du and -da have been added. The new
verbs .du and .eu have been added.
.PP
The following files associated with the PTF system were affected:
.sp
.nf
ptf.a -- mainline
wp.a and wp__body.a -- for -du and -da option processing
cmd.a and cmd__body.a -- for .du and .eu command processing
env.a and env__body.a -- for environment push/pop
cmd__sym.a -- for .du and .eu command symbols
.fi
.bp
.sp 20
.ce
This Page Intentionally Blank
.bp 1
.pn arabic A-#
.ce
.ul
Appendix A: Priority Descriptions by Number
.sp 2
1: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Prevents the accomplishment of an operational
or mission essential capability specified by
baselined requirements,
.sp
Prevents the operator's
accomplishment of an operational or mission
essential capability, or
.sp
Jeoparidzes personnel
safety.
.li -5
.ri -5
.sp
2: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Adversely affects the operator's accomplishment
of an operational or mission essential
capability specified by baselined requirements
so as to degrade performance and for which no
alternative work-around solution is known or
.sp
Adversely affects the operator's accomplishment
of an operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which no alternative
work-around solution is known.
.li -5
.ri -5
.sp
3: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Adversely affects the accomplishment of an
operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which an alternative
work-around solution is known or
.sp
Adversely
affects the operator's accomplishment of an
operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which an alternative
work-around solution is known.
.li -5
.ri -5
.sp
4: A software problem that is an operator inconvenience
or annoyance and which does not affect a required
operational or mission essential capability
.sp
5: All other errors
.bp
.sp 20
.ce
This Page Intentionally Blank
--::::::::::
--ptfpcr02.ptf
--::::::::::
.comment
.! Problem/Change Report as per DoD-STD-2167A
.! This template is compliant with the requirements in the main
.! document of DoD-STD-2167A. This template may be readily altered
.! and still be compliant with DoD-STD-2167A since the guidelines
.! presented in the documentation are very general.
.comment
.vs SYSNAME Portable Text Formatter
.vs DATE 2 Apr 90
.vs ID PTF-02
.lm 11
.rm 70
.nlheader 3
.he 1 ''Problem/Change Report''
.he 2 /@SYSNAME/@ID/@DATE/
.nlfooter 2
.fo 2 //Page #//
.de PP
.sp
.ti +5
.en
.de SECT
.sp 2
.tp 10
------------------------------------------------------------
.nr s +1
Section @ns --
.ul
@1 @2 @3 @4 @5 @6 @7 @8 @9
.sp
.en
.nr s 0
.sp 2
.ce on
Problem/Change Report
.sp
for
.sp
@SYSNAME
.ce off
.sp 2
.SECT Software System Identification
.nf
System Name: @SYSNAME
Version Number: 1.0
Version Date (if known): Unknown
.fi
.SECT Identification of Person Reporting Problem
.nf
Name: Richard Conn
Address:
White Sands
Electronic Mail: rconn_@wsmr-simtel20.army.mil
Phone: N/A
.fi
.SECT Problem Classification and Description
.nf
Classification of Problem by Category
(Check all that apply):
X Software Problem
Documentation Problem
Design Problem
Classification of Problem by Priority
(Check all that apply, see Appendix A for descriptions):
Priority 1
Priority 2
Priority 3
X Priority 4
Priority 5
.fi
.sp 2
.tp 10
.ul
Description of Problem
.PP
If only one argument is given to PTF by accident (that is, an
input file is specified but an output file is not), PTF processes
as though all was all right with no indication of a problem.
.SECT Corrective Action
.sp
.ul
Person to whom Corrective Action is assigned
.sp
.nf
Richard Conn
.fi
.sp
.ul
Recommended Corrective Action Needed to Resolve Problem
.sp
.PP
Check for a single argument and issue an error message.
.sp 2
.ul
Actions Actually Taken to Resolve Problem
.PP
The error in the argument checking mechanism has been identified and
repaired.
.PP
The following files associated with the PTF system were affected:
.sp
.nf
ptf.a -- mainline
.fi
.bp
.sp 20
.ce
This Page Intentionally Blank
.bp 1
.pn arabic A-#
.ce
.ul
Appendix A: Priority Descriptions by Number
.sp 2
1: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Prevents the accomplishment of an operational
or mission essential capability specified by
baselined requirements,
.sp
Prevents the operator's
accomplishment of an operational or mission
essential capability, or
.sp
Jeoparidzes personnel
safety.
.li -5
.ri -5
.sp
2: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Adversely affects the operator's accomplishment
of an operational or mission essential
capability specified by baselined requirements
so as to degrade performance and for which no
alternative work-around solution is known or
.sp
Adversely affects the operator's accomplishment
of an operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which no alternative
work-around solution is known.
.li -5
.ri -5
.sp
3: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Adversely affects the accomplishment of an
operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which an alternative
work-around solution is known or
.sp
Adversely
affects the operator's accomplishment of an
operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which an alternative
work-around solution is known.
.li -5
.ri -5
.sp
4: A software problem that is an operator inconvenience
or annoyance and which does not affect a required
operational or mission essential capability
.sp
5: All other errors
.bp
.sp 20
.ce
This Page Intentionally Blank
--::::::::::
--ptfpcr03.ptf
--::::::::::
.comment
.! Problem/Change Report as per DoD-STD-2167A
.! This template is compliant with the requirements in the main
.! document of DoD-STD-2167A. This template may be readily altered
.! and still be compliant with DoD-STD-2167A since the guidelines
.! presented in the documentation are very general.
.comment
.vs SYSNAME Portable Text Formatter
.vs DATE 2 Apr 90
.vs ID PTF-03
.lm 11
.rm 70
.nlheader 3
.he 1 ''Problem/Change Report''
.he 2 /@SYSNAME/@ID/@DATE/
.nlfooter 2
.fo 2 //Page #//
.de PP
.sp
.ti +5
.en
.de SECT
.sp 2
.tp 10
------------------------------------------------------------
.nr s +1
Section @ns --
.ul
@1 @2 @3 @4 @5 @6 @7 @8 @9
.sp
.en
.nr s 0
.sp 2
.ce on
Problem/Change Report
.sp
for
.sp
@SYSNAME
.ce off
.sp 2
.SECT Software System Identification
.nf
System Name: @SYSNAME
Version Number: 1.0
Version Date (if known): Unknown
.fi
.SECT Identification of Person Reporting Problem
.nf
Name: Richard Conn
Address:
White Sands
Electronic Mail: rconn_@wsmr-simtel20.army.mil
Phone: N/A
.fi
.SECT Problem Classification and Description
.nf
Classification of Problem by Category
(Check all that apply):
X Software Problem
Documentation Problem
Design Problem
Classification of Problem by Priority
(Check all that apply, see Appendix A for descriptions):
Priority 1
Priority 2
Priority 3
X Priority 4
Priority 5
.fi
.sp 2
.tp 10
.ul
Description of Problem
.PP
If an output file already exists, PTF recognizes this as described
and prompts the user to determine if he wishes to delete the file
and continue. However, if the user says NO, the existing output file
is made empty (zero length).
.SECT Corrective Action
.sp
.ul
Person to whom Corrective Action is assigned
.sp
.nf
Richard Conn
.fi
.sp
.ul
Recommended Corrective Action Needed to Resolve Problem
.sp
.PP
Modify code as required to not affect the output file if a
replacement of it is not desired.
.sp 2
.ul
Actions Actually Taken to Resolve Problem
.PP
The error has been identified and corrected.
.PP
The following files associated with the PTF system were affected:
.sp
.nf
ptf.a -- mainline
.fi
.bp
.sp 20
.ce
This Page Intentionally Blank
.bp 1
.pn arabic A-#
.ce
.ul
Appendix A: Priority Descriptions by Number
.sp 2
1: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Prevents the accomplishment of an operational
or mission essential capability specified by
baselined requirements,
.sp
Prevents the operator's
accomplishment of an operational or mission
essential capability, or
.sp
Jeoparidzes personnel
safety.
.li -5
.ri -5
.sp
2: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Adversely affects the operator's accomplishment
of an operational or mission essential
capability specified by baselined requirements
so as to degrade performance and for which no
alternative work-around solution is known or
.sp
Adversely affects the operator's accomplishment
of an operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which no alternative
work-around solution is known.
.li -5
.ri -5
.sp
3: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Adversely affects the accomplishment of an
operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which an alternative
work-around solution is known or
.sp
Adversely
affects the operator's accomplishment of an
operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which an alternative
work-around solution is known.
.li -5
.ri -5
.sp
4: A software problem that is an operator inconvenience
or annoyance and which does not affect a required
operational or mission essential capability
.sp
5: All other errors
.bp
.sp 20
.ce
This Page Intentionally Blank
--::::::::::
--ptfpcr04.ptf
--::::::::::
.comment
.! Problem/Change Report as per DoD-STD-2167A
.! This template is compliant with the requirements in the main
.! document of DoD-STD-2167A. This template may be readily altered
.! and still be compliant with DoD-STD-2167A since the guidelines
.! presented in the documentation are very general.
.comment
.vs SYSNAME Portable Text Formatter
.vs DATE 2 Apr 90
.vs ID PTF-04
.lm 11
.rm 70
.nlheader 3
.he 1 ''Problem/Change Report''
.he 2 /@SYSNAME/@ID/@DATE/
.nlfooter 2
.fo 2 //Page #//
.de PP
.sp
.ti +5
.en
.de SECT
.sp 2
.tp 10
------------------------------------------------------------
.nr s +1
Section @ns --
.ul
@1 @2 @3 @4 @5 @6 @7 @8 @9
.sp
.en
.nr s 0
.sp 2
.ce on
Problem/Change Report
.sp
for
.sp
@SYSNAME
.ce off
.sp 2
.SECT Software System Identification
.nf
System Name: @SYSNAME
Version Number: 1.0
Version Date (if known): Unknown
.fi
.SECT Identification of Person Reporting Problem
.nf
Name: Richard Conn
Address:
White Sands
Electronic Mail: rconn_@wsmr-simtel20.army.mil
Phone: N/A
.fi
.SECT Problem Classification and Description
.nf
Classification of Problem by Category
(Check all that apply):
X Software Problem
Documentation Problem
X Design Problem
Classification of Problem by Priority
(Check all that apply, see Appendix A for descriptions):
Priority 1
Priority 2
Priority 3
X Priority 4
Priority 5
.fi
.sp 2
.tp 10
.ul
Description of Problem
.PP
Variables identified by _@variablename have trailing spaces
appended to them. This is not desirable in general.
.SECT Corrective Action
.sp
.ul
Person to whom Corrective Action is assigned
.sp
.nf
Richard Conn
.fi
.sp
.ul
Recommended Corrective Action Needed to Resolve Problem
.sp
.PP
Do not add any extra trailing spaces after a parameter is resolved.
.sp 2
.ul
Actions Actually Taken to Resolve Problem
.PP
The error has been identified and corrected.
.PP
The following files associated with the PTF system were affected:
.sp
.nf
cmd__body.a COMMAND.PROCESS.PARSE__HF.SUB__PARSE
fof__body.a FOF.PUT__HEADER__FOOTER__LINE.BUILD__TEMP__STRING
mac__body.a MACRO.DEFINE__PARAMETERS
wp_body.a WP.EXPAND.EXPAND__VARIABLE
.fi
.bp
.sp 20
.ce
This Page Intentionally Blank
.bp 1
.pn arabic A-#
.ce
.ul
Appendix A: Priority Descriptions by Number
.sp 2
1: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Prevents the accomplishment of an operational
or mission essential capability specified by
baselined requirements,
.sp
Prevents the operator's
accomplishment of an operational or mission
essential capability, or
.sp
Jeoparidzes personnel
safety.
.li -5
.ri -5
.sp
2: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Adversely affects the operator's accomplishment
of an operational or mission essential
capability specified by baselined requirements
so as to degrade performance and for which no
alternative work-around solution is known or
.sp
Adversely affects the operator's accomplishment
of an operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which no alternative
work-around solution is known.
.li -5
.ri -5
.sp
3: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Adversely affects the accomplishment of an
operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which an alternative
work-around solution is known or
.sp
Adversely
affects the operator's accomplishment of an
operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which an alternative
work-around solution is known.
.li -5
.ri -5
.sp
4: A software problem that is an operator inconvenience
or annoyance and which does not affect a required
operational or mission essential capability
.sp
5: All other errors
.bp
.sp 20
.ce
This Page Intentionally Blank
--::::::::::
--ptfpcr05.ptf
--::::::::::
.comment
.! Problem/Change Report as per DoD-STD-2167A
.! This template is compliant with the requirements in the main
.! document of DoD-STD-2167A. This template may be readily altered
.! and still be compliant with DoD-STD-2167A since the guidelines
.! presented in the documentation are very general.
.comment
.vs SYSNAME Portable Text Formatter
.vs DATE 1 May 90
.vs ID PTF-05
.lm 11
.rm 70
.nlheader 3
.he 1 ''Problem/Change Report''
.he 2 /@SYSNAME/@ID/@DATE/
.nlfooter 2
.fo 2 //Page #//
.de PP
.sp
.ti +5
.en
.de SECT
.sp 2
.tp 10
------------------------------------------------------------
.nr s +1
Section @ns --
.ul
@1 @2 @3 @4 @5 @6 @7 @8 @9
.sp
.en
.nr s 0
.sp 2
.ce on
Problem/Change Report
.sp
for
.sp
@SYSNAME
.ce off
.sp 2
.SECT Software System Identification
.nf
System Name: @SYSNAME
Version Number: 1.1
Version Date (if known): Unknown
.fi
.SECT Identification of Person Reporting Problem
.nf
Name: Richard Conn
Address:
White Sands
Electronic Mail: rconn_@wsmr-simtel20.army.mil
Phone: N/A
.fi
.SECT Problem Classification and Description
.nf
Classification of Problem by Category
(Check all that apply):
X Software Problem
Documentation Problem
Design Problem
Classification of Problem by Priority
(Check all that apply, see Appendix A for descriptions):
X Priority 1 (PTF cannot be compiled by Meridian Ada)
Priority 2
Priority 3
Priority 4
Priority 5
.fi
.sp 2
.tp 10
.ul
Description of Problem
.PP
PTF cannot be compiled with the Meridian AdaVantage 4.0 compiler
due to a bug in the way the compiler handles a package declaration
inside the body of a generic package. The problem is with package
FILE__LISTER2 specifically.
.SECT Corrective Action
.sp
.ul
Person to whom Corrective Action is assigned
.sp
.nf
Richard Conn
.fi
.sp
.ul
Recommended Corrective Action Needed to Resolve Problem
.sp
.PP
Modify FILE__LISTER2.A so that it can be compiled with Meridian AdaVantage 4.0
while still being able to be compiled with Verdix Ada and DEC Ada.
.sp 2
.ul
Actions Actually Taken to Resolve Problem
.PP
FILE__LISTER2.A was modified to allow compilation with Meridian AdaVantage 4.0.
.PP
The following files associated with the PTF system were affected:
.sp
.nf
file__lister2.a
.fi
.bp
.sp 20
.ce
This Page Intentionally Blank
.bp 1
.pn arabic A-#
.ce
.ul
Appendix A: Priority Descriptions by Number
.sp 2
1: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Prevents the accomplishment of an operational
or mission essential capability specified by
baselined requirements,
.sp
Prevents the operator's
accomplishment of an operational or mission
essential capability, or
.sp
Jeoparidzes personnel
safety.
.li -5
.ri -5
.sp
2: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Adversely affects the operator's accomplishment
of an operational or mission essential
capability specified by baselined requirements
so as to degrade performance and for which no
alternative work-around solution is known or
.sp
Adversely affects the operator's accomplishment
of an operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which no alternative
work-around solution is known.
.li -5
.ri -5
.sp
3: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Adversely affects the accomplishment of an
operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which an alternative
work-around solution is known or
.sp
Adversely
affects the operator's accomplishment of an
operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which an alternative
work-around solution is known.
.li -5
.ri -5
.sp
4: A software problem that is an operator inconvenience
or annoyance and which does not affect a required
operational or mission essential capability
.sp
5: All other errors
.bp
.sp 20
.ce
This Page Intentionally Blank
--::::::::::
--ptfpcr06.ptf
--::::::::::
.comment
.! Problem/Change Report as per DoD-STD-2167A
.! This template is compliant with the requirements in the main
.! document of DoD-STD-2167A. This template may be readily altered
.! and still be compliant with DoD-STD-2167A since the guidelines
.! presented in the documentation are very general.
.comment
.vs SYSNAME Portable Text Formatter
.vs DATE 7 May 90
.vs ID PTF-06
.lm 11
.rm 70
.nlheader 3
.he 1 ''Problem/Change Report''
.he 2 /@SYSNAME/@ID/@DATE/
.nlfooter 2
.fo 2 //Page #//
.de PP
.sp
.ti +5
.en
.de SECT
.sp 2
.tp 10
------------------------------------------------------------
.nr s +1
Section @ns --
.ul
@1 @2 @3 @4 @5 @6 @7 @8 @9
.sp
.en
.nr s 0
.sp 2
.ce on
Problem/Change Report
.sp
for
.sp
@SYSNAME
.ce off
.sp 2
.SECT Software System Identification
.nf
System Name: @SYSNAME
Version Number: 1.1
Version Date (if known): Unknown
.fi
.SECT Identification of Person Reporting Problem
.nf
Name: Richard Conn
Address:
White Sands
Electronic Mail: rconn_@wsmr-simtel20.army.mil
Phone: N/A
.fi
.SECT Problem Classification and Description
.nf
Classification of Problem by Category
(Check all that apply):
Software Problem
Documentation Problem
X Design Problem
Classification of Problem by Priority
(Check all that apply, see Appendix A for descriptions):
Priority 1
Priority 2
Priority 3
X Priority 4
Priority 5
.fi
.sp 2
.tp 10
.ul
Description of Problem
.PP
Include files cannot have lines which are PTF options (i.e.,
beginning with a single dash). Lines in include files beginning
with either one or two dashes are interpreted as comments.
.PP
It is desirable to employ the new CLP package for this form
of command argument interface, as opposed to using CLI with
FILE__LISTER2.
.SECT Corrective Action
.sp
.ul
Person to whom Corrective Action is assigned
.sp
.nf
Richard Conn
.fi
.sp
.ul
Recommended Corrective Action Needed to Resolve Problem
.sp
.PP
Use package CLP to implement the interface to the file names and options
given on the command line.
.sp 2
.ul
Actions Actually Taken to Resolve Problem
.PP
The use of FILE__LISTER2 was dropped. CLP was used instead.
.PP
The following files associated with the PTF system were affected:
.sp
.nf
ptf.a -- mainline
.fi
.bp
.sp 20
.ce
This Page Intentionally Blank
.bp 1
.pn arabic A-#
.ce
.ul
Appendix A: Priority Descriptions by Number
.sp 2
1: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Prevents the accomplishment of an operational
or mission essential capability specified by
baselined requirements,
.sp
Prevents the operator's
accomplishment of an operational or mission
essential capability, or
.sp
Jeoparidzes personnel
safety.
.li -5
.ri -5
.sp
2: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Adversely affects the operator's accomplishment
of an operational or mission essential
capability specified by baselined requirements
so as to degrade performance and for which no
alternative work-around solution is known or
.sp
Adversely affects the operator's accomplishment
of an operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which no alternative
work-around solution is known.
.li -5
.ri -5
.sp
3: A software problem that does one of the following:
.br
.li +5
.ri +5
.sp
Adversely affects the accomplishment of an
operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which an alternative
work-around solution is known or
.sp
Adversely
affects the operator's accomplishment of an
operational or mission essential capability
specified by baselined requirements so as to
degrade performance and for which an alternative
work-around solution is known.
.li -5
.ri -5
.sp
4: A software problem that is an operator inconvenience
or annoyance and which does not affect a required
operational or mission essential capability
.sp
5: All other errors
.bp
.sp 20
.ce
This Page Intentionally Blank